I am new to the library tweepy. I can capture the twitter stream if I use a filter like the one shown below and look for tweets containing the word “snow” in the text box.
import tweepy
ckey = ''
csecret = ''
atoken = ''
asecret = ''
auth = OAuthHandler(ckey, csecret)
auth.set_access_token(atoken, asecret)
twitterStream = Stream(auth, listener())
twitterStream.filter(track=["snow"])
However, I don’t know how to capture all the tweets without doing any filtering. If I leave the last line of the above code, the program will start, but I do not receive any tweets. If I change the track parameter to track=[]or track=[""], I get a 406 error code from the Twitter API.
I am using Python 3.4.2.
source
share