def get_live_tweets(auth, phrase, fname='./tmp/liveStream.json', runTime=60):
twitter_stream = Stream(auth, Listener(fname))
twitter_stream.filter(track=[phrase], async=True)
time.sleep(runTime)
twitter_stream.disconnect()
评论列表
文章目录