Tweep is an advanced Twitter scraping tool written in python that allows for scraping Tweets and pictures from Twitter profiles without using Twitter’s API.
Some of the benefits of using Tweep vs Twitter API:
- Fast initial setup
- Can be used anonymously
- No rate limitations
- Can fetch all Tweets (Twitter API limits to last 3200 Tweets)
pip install beautifulsoup4
-uThe user’s Tweets you want to scrape.
-sSearch for Tweets containing this word or phrase.
--yearFilter tweets before the specified year.
--picsDownload all the pictures from Tweets.
--fruitDisplay Tweets with “low-hanging-fruit”.
--tweetsDisplay Tweets only.
--verifiedDisplay Tweets only from verified users (Use with
--usersDisplay users only (Use with
--fruit feature will display Tweets that might contain sensitive info such as:
- Profiles from leaked databases (Myspace or LastFM)
- Email addresses
- Phone numbers
Basic Examples and Combos.
A few simple examples to help you understand the basics:
python tweep.py -u username– Scrape all the Tweets from user‘s timeline.
python tweep.py -u username -s pineapple– Scrape all Tweets from the user‘s timeline containing pineapple.
python tweep.py -s pineapple– Collect every Tweet containing pineapple from everyone’s Tweets.
python tweep.py -u username --year 2014– Collect Tweets that were tweeted before 2014.
python tweep.py -u username --pics– Download all pictures from user‘s timeline.
python tweep.py -u username --fruit– Show Tweets with low-hanging fruit.
python tweep.py -s "Donald Trump" --verified --users– List verified users that Tweet about Donald Trump.
881653591265746945 2017-07-02 23:19:31 UTC <dqt> i need to drink more water