2023-09-09 15:34:33 +08:00
2023-09-09 15:34:33 +08:00
2023-09-09 12:35:03 +08:00
2023-09-08 23:19:17 +08:00
2023-09-09 12:23:18 +08:00
2023-09-09 12:35:03 +08:00

selenium-twitter-scraper

Setup

  1. Install dependencies
pip install -r requirements.txt
  1. Rename .env.example to .env.
  2. 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.
Readme Apache-2.0 215 KiB
Languages
Jupyter Notebook 52.9%
Python 47.1%