我正在尝试使用 Python 中的 tweepy 获取较旧的推文数据(大约 2 个月前)。我尝试了 since 和 until 参数但没有成功。有没有人在 tweepy 或其他一些 API 中得到解决。
for id,tweet in enumerate (tweepy.Cursor(api.search, q='SpecificWord', since="2016-04-26", until="2016-04-28", lang="en", include_retweets=False ).items(200)):
#Write a row to the csv file
CSVW.writerow([tweet.created_at, tweet.retweet_count, tweet.text.encode('utf-8')])
最佳答案
这是不可能的。 The docs on the Twitter API are very clear :
The Twitter Search API searches against a sampling of recent Tweets published in the past 7 days.
没有比这更远的搜索方式了。
关于python - 使用 Python 的旧推文 Tweepy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37017903/