我目前正在使用以下代码,这将获取推文,然后将其传递给处理的函数.但这不是实时的.
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
mentions = api.mentions_timeline(count=1)
for mention in mentions:
processText()
Run Code Online (Sandbox Code Playgroud)
我也查看了流媒体推文,但我还没有找到一种方法来流式提及.