How to use API.statuses_lookup in Tweepy

半腔热情 提交于 2019-12-13 08:45:37

问题


I am looking an example how to use "API.statuses_lookup".


回答1:


use

tweets = self.api.statuses_lookup(tweetIDs)

tweetIDs is a list of your tweet ids ,which u have from ur database or somewhere else in response you will get a status object now use for loop

**for tweet in tweets:
   #tweet obtained
   print(str(tweet['id'])+str(tweet['text']))**

u can provide maximum 100 tweets



来源:https://stackoverflow.com/questions/39828384/how-to-use-api-statuses-lookup-in-tweepy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!