I would like to request tweets on a specific topic (for example: \"cancer\"), using Python Tweepy. But usually its time can only be specified by a specific day, for example.
There is no way that I've found to specific a time using since/until.
You can hack your way around this using since_id
& max_id
.
If you can find a tweet made at around the times you want, you can restrict you search to those made after since_id
and before max_id
import tweepy
consumer_key = 'aaa'
consumer_secret = 'bbb'
access_token = 'ccc'
access_token_secret = 'ffffd'
# OAuth process, using the keys and tokens
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
results = api.search(q="cancer", since_id=518857118838181000, max_id=518857136202194000)
for result in results:
print result.text