如何通过tweepy获得推文作者

问题描述 投票:0回答:1

我有一个Twitter机器人,该机器人会自动输入Twitter赠品,但您需要标记大多数赠品和朋友,或者,我有它,所以喜欢,并转发,但我无法回复

if ("tag" in tweet.text or "TAG" or "reply"):
  try: 
     api.update_status('@' + tweet.author + '@example1, @example2')
  except Exception:
       pass

这不起作用有什么想法吗?

python twitter tweepy twitterapi-python
1个回答
0
投票

您将要使用tweet.author.name。这是我最近发布的一个转发机器人中的一个示例。

https://github.com/Kamori/ValorantLFM/blob/master/retweeter/valorantlfm.py#L92

© www.soinside.com 2019 - 2024. All rights reserved.