I am trying to collect tweets about natural disasters just for my academic purposes. But it seems I am not able to get the tweets older than a week.
I have tried tweepy, python-twitter, twython.
Is there anyway that I can collect more tweets?
My code
from twython import Twython
import json
app_key=""
app_secret=""
oauth_token=""
ouath_token_secret=""
twitter = Twython(app_key,app_secret,oauth_token,ouath_token_secret)
data=twitter.search(q='MumbaiRains',result_type='Mixed',count=100)
statuses = data['statuses']
for post in statuses:
print(post['id_str']+':'+post['text'])
I am able to get 80 records as there are only 80 tweets in the last 7 days.
If I print data['search_metadata'] I am getting
{u'count': 100, u'completed_in': 0.053, u'max_id_str': u'939389383920164864', u'since_id_str': u'0', u'refresh_url': u'?since_id=939389383920164864&q=MumbaiRains&result_type=Mixed&include_entities=1', u'since_id': 0, u'query': u'MumbaiRains', u'max_id': 939389383920164864}