taspinar / twitterscraper

Scrape Twitter for Tweets
MIT License
2.39k stars 581 forks source link

Scrape all tweets (include retweets) from one specfic user. #287

Closed zhichenghao closed 4 years ago

zhichenghao commented 4 years ago

Hi,

Thanks for the sharing tool. I am trying to scrape all tweets from one specifc user.

This code twitterscraper realDonaldTrump --user -o tweets_username.json is work but only return one month tweets. And it return Twitter returned : 'has_more_items' on the console. The bd and ed is not work in this query as well. I have searched it and Twitter do not track based on IP.

is there any chance i can get all the tweets (include retweets) from on specific user?

lapp0 commented 4 years ago

It appears twitters API doesn't allow you to view more than 1300 of trumps tweets. I even tried with a browser and it stops showing new tweets at a certain point.

A workaround is to run two queries: filter:nativeretweets from:realdonaldtrump and from:realdonaldtrump

lapp0 commented 4 years ago

I just incorporated this behavior for --user into https://github.com/taspinar/twitterscraper/pull/302