猿问

TweepError: [{'code': 144, 'message': '找不到该 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)


HUWWW
浏览 141回答 3
3回答

紫衣仙女

这个错误TwitterError: [{'code': 144, 'message': 'No status found with that ID.'}]是因为json返回id所以id_str你必须使用id_str转发!

www说

实现没有问题,只是 id 无效。尝试不同的ID。

暮色呼如

我收到类似的错误:TwitterError: [{'code': 144, 'message': 'No status found with that ID.'}]当我运行这段代码时,似乎许多 ID 都为我返回了它:import twitterapi = twitter.Api(consumer_key, consumer_secret, access_token_key, access_token_secret)api.VerifyCredentials()tweet = api.GetStatus(tweet_ids[420])print(tweet)我认为它会引发此错误,因为许多推文要么被用户删除,要么个人资料本身已被删除。
随时随地看视频慕课网APP

相关分类

Python
我要回答