嘿,我正在使用推文 ID 来提取推文,但遇到了这个错误TweepError: [{'code': 144, 'message': 'No status found with that ID.'}]。我尝试了许多其他推文 ID,但错误是相同的。我的代码:id=591902698594701314import tweepyauth = 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)
3 回答

紫衣仙女
TA贡献1839条经验 获得超15个赞
这个错误TwitterError: [{'code': 144, 'message': 'No status found with that ID.'}]
是因为json返回id
所以id_str
你必须使用id_str
转发!

暮色呼如
TA贡献1853条经验 获得超9个赞
我收到类似的错误:
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)
我认为它会引发此错误,因为许多推文要么被用户删除,要么个人资料本身已被删除。
添加回答
举报
0/150
提交
取消