stweet icon indicating copy to clipboard operation
stweet copied to clipboard

st.CollectorRawOutput()

Open ZohairAbbas opened this issue 1 year ago • 1 comments

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)

ZohairAbbas avatar May 31 '23 22:05 ZohairAbbas

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.

ataniz avatar Jun 02 '23 13:06 ataniz