如何使用 tweepy 获取推文作者
How to get tweets author with tweepy
我有一个推特机器人,它会自动进入推特赠品,但大多数赠品你需要标记和朋友或 2,
我有它,所以它会跟随、喜欢和转推,但我无法让它回复
if ("tag" in tweet.text or "TAG" or "reply"):
try:
api.update_status('@' + tweet.author + '@example1, @example2')
except Exception:
pass
这不起作用
有什么想法吗?
您需要使用 tweet.author.name
。这是我最近制作的转发机器人的示例。
https://github.com/Kamori/ValorantLFM/blob/master/retweeter/valorantlfm.py#L92
我有一个推特机器人,它会自动进入推特赠品,但大多数赠品你需要标记和朋友或 2, 我有它,所以它会跟随、喜欢和转推,但我无法让它回复
if ("tag" in tweet.text or "TAG" or "reply"):
try:
api.update_status('@' + tweet.author + '@example1, @example2')
except Exception:
pass
这不起作用 有什么想法吗?
您需要使用 tweet.author.name
。这是我最近制作的转发机器人的示例。
https://github.com/Kamori/ValorantLFM/blob/master/retweeter/valorantlfm.py#L92