I wish to collect all tweets containing specific keywords(ex:manchesterattack,manchester) that are posted about the manchester attack from 22may. Can anyone provide me a code to collect tweets using python I have used following code:
import json
import tweepy
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)for tweet in tweepy.Cursor(api.search, q="manchester OR manchesterarena OR manchesterbombing ", lang="en").items():print(json.dumps(tweet._json))
I know this code return tweets from last week only. I would like to collect tweets from 22may(more than a week). How can I do that?