次のコードを使用して、Python Tweetstream ライブラリを使用して Twitter からツイートを取得していますが、意味のない特定の単語やツイートのない単語を使用すると、ストリーミングが停止します。60秒などの一定時間後にストリーミングをタイムアウトさせたい。どうやってやるの?
words = ["opera", "firefox", "safari"]
people = [123,124,125]
locations = ["-122.75,36.8", "-121.75,37.8"]
with tweetstream.FilterStream("username", "password", track=words, follow=people, locations=locations) as stream
for tweet in stream:
print "Got interesting tweet:", tweet