stweet
stweet copied to clipboard
st.CollectorRawOutput()
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)
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.