SkillAgentSearch skills...

TwitterScraper

This project demonstrates web scraping of Twitter using Python and Selenium. The code logs in to Twitter, searches for tweets with a specific keyword, and extracts user data and tweet text. The scraped data is saved to a CSV file which then can be used for further analysis.

Install / Use

/learn @zararashraf/TwitterScraper
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Twitter Tweet Scraper

License

Description

The Twitter Tweet Scraper is a Python-based project designed to extract tweets from Twitter using Selenium and WebDriver. It allows users to specify search criteria, such as keywords or hashtags, and retrieve tweets from the Twitter platform. This project uses the Twitter website, simulating user interactions to access and scrape tweet data. The scraped data, including user information and tweet text, is then stored in a CSV file for analysis, research, or any other purpose.

Features

  • Automated scraping of tweets from the Twitter website.
  • Customizable search queries for specific topics, keywords, or hashtags.
  • Error handling to ensure robust performance.
  • Configurable variables for tweet count and user credentials.

Libraries and Technologies Used

  • Python 3.x
  • Selenium for web scraping and automation.
  • WebDriver for controlling the web browser.
  • Pandas for data manipulation and storage.
  • WebDriverWait for efficient synchronization with web page elements.

Usage

  1. Clone this repository: git clone https://github.com/zararashraf/TwitterScraper.git
  2. Install the required libraries: pip install selenium pandas
  3. Set your Twitter username and password in the script.
  4. Customize the search query and maximum tweet count as needed.
  5. Run the script: python main.py

Code Repository

You can access the source code for this project on GitHub.

Screenshots

image image

Credits

  • Selenium: https://www.selenium.dev/
  • Pandas: https://pandas.pydata.org/
  • Python: https://www.python.org/

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code while providing appropriate attribution.

View on GitHub
GitHub Stars10
CategoryProduct
Updated1y ago
Forks2

Languages

Python

Security Score

60/100

Audited on Jan 18, 2025

No findings