python - TweepError: [{'code': 144, 'message': 'No status found with that ID.'}]
问题描述
嘿,我正在使用推文 ID 来提取推文,但遇到了这个错误TweepError: [{'code': 144, 'message': 'No status found with that ID.'}]
。我尝试了许多其他推文 ID,但错误是相同的。
我的代码:
id=591902698594701314
import tweepy
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
tweet = api.get_status(id)
print(tweet.text)
解决方案
我收到类似的错误:
TwitterError: [{'code': 144, 'message': 'No status found with that ID.'}]
当我运行此代码时,似乎许多 ID 都会为我返回它:
import twitter
api = twitter.Api(consumer_key, consumer_secret, access_token_key, access_token_secret)
api.VerifyCredentials()
tweet = api.GetStatus(tweet_ids[420])
print(tweet)
我相信它会引发此错误,因为许多推文要么被用户删除,要么配置文件本身已被删除。
推荐阅读
- java - 我正在尝试使用 json 文件从 url 获取 youtube 标题,但我没有得到任何结果,我也没有得到任何异常
- python - 频谱图生成
- javascript - 无论变量范围如何,函数都会继续返回未定义
- r - 关于使用 fread 对输入的数据文件进行后处理
- ios - 按下按钮时在视图之间切换 - SwiftUI
- bash - 如何在 bash 脚本(期望)中匹配这个 [admin@MikroTik] >?
- android - 来自 Play 商店信号 11 (SIGSEGV) 的崩溃报告,代码 1 (SEGV_MAPERR)
- azure - 为什么 AzureServiceTokenProvider 返回过期的访问令牌?
- python - 如何循环检查列表中的所有值是否大于另一个列表中的值?
- stripe-payments - Stripe:当新客户使用特定优惠券代码订阅时,向“朋友”发送佣金