Skip to content
/ XBot Public

XBot is an automated scraping bot built with Python, Selenium, and pandas that extracts tweets and user data from X (Twitter) using browser automation. It supports authentication via saved cookies (exported using a Chrome extension) and saves results to structured CSV files

Notifications You must be signed in to change notification settings

AmadIrfan/XBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XBot

XBot is an automated scraping bot built with Python, Selenium, and pandas that extracts tweets and user data from X (Twitter) using browser automation.
It supports authentication via saved cookies (exported using a Chrome extension) and saves results to structured CSV files.

🚀 Features

✅ Extracts usernames, tweet text, and like counts
✅ Uses Selenium for automated browser control
✅ Supports cookie-based authentication (no manual login each time)
✅ Saves data as CSV using pandas
✅ Organized OOP structure (Auth, Driver, Scraper, Save)

📁 Project Structure

App

Bot/
├── auth/
│      ├── __init__.py
│      └── authentication.py
├── cookies/
│      ├── __init__.py
│      └── cookies_manager.py
├── driver/
│      ├── __init__.py
│      └── webdriver_manager.py
├── scraper/
│      ├── __init__.py
│      └── twitter_scraper.py
│── model.py
├── x.com.cookies.json
├── images/
|      └── img
├── *.csv
├── requirements.txt
├── main.py
└── README.md

Pictures

Processing

Finish

🧩 Tech Stack

  1. Python 3.10+
  2. Selenium
  3. Pandas

⚙️ Setup Instructions

1. Clone the repository

git clone https://github.com/amadirfan/XBot.git
cd XBot

2. Create and Activate Python Virtual Environment

python -m venv venv
venv\Scripts\activate   # On Windows
# OR
source venv/bin/activate  # On macOS/Linux

3. Install dependencies

pip install -r requirements.txt

4. Set Cookies

in root dir paste file named x.com.cookies.json

touch x.com.cookies.json

5. Run Code

python main.py

About

XBot is an automated scraping bot built with Python, Selenium, and pandas that extracts tweets and user data from X (Twitter) using browser automation. It supports authentication via saved cookies (exported using a Chrome extension) and saves results to structured CSV files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages