如何使用Tweepy回复特定用户最近的tweet?

2024-06-07 14:27:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我找到密码了

toReply = "xxx" 
api = tweepy.API(auth)



tweets = api.user_timeline(screen_name = toReply, count=1)

for tweet in tweets:
api.update_status("@" + toReply + " my reply", in_reply_to_status_id = tweet.id)

但这不是我要找的。它只是回复最新的tweet。我希望机器人每次xxx发微博时都能回复。我应该在代码中更改什么?在


Tags: inauthapiid密码statusreplytimeline

热门问题