8843b4d81ef19bbd694bac3133edbee3c086c524
selenium-twitter-scraper
Setup
- Install dependencies
pip install -r requirements.txt
- Rename
.env.exampleto.env. - Open .env and update environment variables
TWITTER_USERNAME=# Your Twitter Handle (e.g. @username)
TWITTER_PASSWORD=# Your Twitter Password
Usage
- Basic usage
python scraper
- Setting maximum number of tweets. defaults to
50.
python scraper --tweets=500 # Scrape 500 Tweets
Options and Arguments
usage: python scraper [arg]
Arguments Description
--tweets : No. of tweets. default: 50.
e.g. --tweets=500
Description
This is a Twitter Scraper which uses Selenium for scraping tweets. It is capable of scraping tweets from home, user profile, hashtag, query or search, and advanced searches.
215 KiB
Languages
Jupyter Notebook
52.9%
Python
47.1%