[英]Twitter API v2 and Tweepy, how to get tweet author for streamed tweets?
[英]How to get tweets author with tweepy
我有一個 twitter 自動輸入 twitter 贈品的機器人,但大多數贈品你需要標記和朋友或 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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.