首页 > 解决方案 > 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)

标签: pythontexttweets

解决方案


我收到类似的错误:

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)

我相信它会引发此错误,因为许多推文要么被用户删除,要么配置文件本身已被删除。


推荐阅读