How to I stream language tweets? #1193
Answered
by
Harmon758
raomanohar
asked this question in
Questions
-
Hi, I am trying to stream Portuguese tweets and perform sentiment analysis on those If I pass in a stream.filter("lang='pt') its not working, If I use a tweepy.Cursor then I am able to filter tweets based on language but those are not realtime tweets. I am looking to stream Tweets made in Portuguese and perform sentiment analysis please help |
Beta Was this translation helpful? Give feedback.
Answered by
Harmon758
Apr 24, 2019
Replies: 1 comment
-
There's syntactical mistakes with how you're passing the keyword argument, but the name of the kwarg for Lines 432 to 433 in cc3c8e7 stream.filter(languages=["pt"]) .However, note, you'll still need to input either a list of user IDs to follow, using follow ; a list of keywords to track, using track ; or a list of locations to track, using locations .See https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters and https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/post-statuses-filter. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Harmon758
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's syntactical mistakes with how you're passing the keyword argument, but the name of the kwarg for
Stream.filter
islanguages
anyway:tweepy/tweepy/streaming.py
Lines 432 to 433 in cc3c8e7
stream.filter(languages=["pt"])
.However, note, you'll still need to input either a list of user IDs to follow, using
follow
; a list of keywords to track, usingtrack
; or a list of locations to track, usinglocations
.See https://developer.twitter.com/en/docs/tweets…