How to save all replies and comments of a twitter username within specific time period?

274 views Asked by At

I am going to collect all the comments of a particular Twitter username within 2018. How can I do that?

The code below scrape tweets for one tweet without time consideration:

name = 'MoveTheWorld'
tweet_id = '1310127204538482690'
replies=[]
for tweet in tweepy.Cursor(api.search,q='to:'+name, result_type='recent', timeout=999999).items(8000):
if hasattr(tweet, 'in_reply_to_status_id_str'):
    if (tweet.in_reply_to_status_id_str==tweet_id):                        
        replies.append(tweet)
0

There are 0 answers