Why cannot you access tweets older than a week in tweepy?
Hi! You are wondering why your code is not working, when you try to download old tweets…
Indeed, the problem is not in your code, but in the Twitter API, which permits to access only to the tweets of the last week. The official Twitter documentation says:
The recent search endpoint allows you to programmatically access filtered public Tweets posted over the last week, and is available via the Standard and Academic Research product tracks.
In order to build a complete dataset, you could run your code daily and then hope that in the future it will be so big for your analysis.
Another solution to your problem could be to search in the Internet for some available datasets, such as those available here (which I have not tested personally). In addition, you could read this thread for some inspiration.
This post is a response to a comment posted on the following article:
How to build a dataset from Twitter using Python tweepy
A quick tutorial and a ready-to-go script to extract tweets
Thank you Kian Tiari for your comment :)