Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st.CollectorRawOutput() #109

Open
ZohairAbbas opened this issue May 31, 2023 · 1 comment
Open

st.CollectorRawOutput() #109

ZohairAbbas opened this issue May 31, 2023 · 1 comment

Comments

@ZohairAbbas
Copy link

Can anyone guide me how the collector raw output works and how can I get the results stored in a list?

import stweet as st
def try_tweet_by_id_scrap():
id_task = st.TweetsByIdTask('1660498047015727104')
output_print = st.CollectorRawOutput()
print(st.TweetsByIdRunner(tweets_by_id_task=id_task,raw_data_outputs=[output_print]).run())

if name == 'main':
try_tweet_by_id_scrap()

Response:
TweetsByIdResult(downloaded_count=26)

@ataniz
Copy link

ataniz commented Jun 2, 2023

variable assigned to CollectorRawOutput(), CollectorRawOutput object, contains get_raw_list() method that returns the resulted list. In your case after the run completes, you may use output_print.get_raw_list() to collect the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants