嘿,我正在使用推文 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
提交
取消