jonbakerfish/TweetScraper
jonbakerfish/TweetScraper has 1,061 GitHub stars and 302 forks. Star changes are not measured yet. Last checked 2026-11-09 11:17 UTC. Last push 2021-04-03.
TweetScraper is a simple crawler/spider for Twitter Search without using API
Measured star growth
- in 24h
- Update delayed
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalIntroduction
TweetScraper can get tweets from Twitter Search.
It is built on Scrapy without using Twitter's APIs.
The crawled data is not as clean as the one obtained by the APIs, but the benefits are you can get rid of the API's rate limits and restrictions. Ideally, you can get all the data from Twitter Search.
WARNING: please be polite and follow the crawler's politeness policy.
Installation
Install
conda, you can get it from miniconda. The tested python version is3.7.Install selenium python bindings: https://selenium-python.readthedocs.io/installation.html. (Note: the
KeyError: 'driver'is caused by wrong setup)For ubuntu or debian user, run:
$ bash install.sh $ conda activate tweetscraper $ scrapy list $ #If the output is 'TweetScraper', then you are ready to go.the
install.shwill create a new environmenttweetscraperand install all the dependencies (e.g.,firefox-geckodriverandfirefox),
Usage
Change the
USER_AGENTinTweetScraper/settings.pyto identify who you areUSER_AGENT = 'your website/e-mail'In the root folder of this project, run command like:
scrapy crawl TweetScraper -a query="foo,#bar"where
queryis a list of keywords seperated by comma and quoted by". The query can be any thing (keyword, hashtag, etc.) you want to search in Twitter Search.TweetScraperwill crawl the search results of the query and save the tweet content and user information.The tweets will be saved to disk in
./Data/tweet/in default settings and./Data/user/is for user data. The file format is JSON. Change theSAVE_TWEET_PATHandSAVE_USER_PATHinTweetScraper/settings.pyif you want another location.
Acknowledgement
Keeping the crawler up to date requires continuous efforts, please support our work via opencollective.com/tweetscraper.
License
TweetScraper is released under the GNU GENERAL PUBLIC LICENSE, Version 2
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,590 starspublic-apis/public-apis
A collective list of free APIs
497,908 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
449,688 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,301 stars