def main():
#This handles Twitter authetification and the connection to Twitter Streaming API
l = StdOutListener()
auth = OAuthHandler(k.consumer_key, k.consumer_secret)
auth.set_access_token(k.access_token, k.access_secret)
stream = Stream(auth, l)
#This line filter Twitter Streams to capture data by keywords
stream.filter(languages=["en"], track=[("Valentine")])
评论列表
文章目录