Skip to content

pyTweetCli: A Python script for effortless tweet retrieval using Selenium via the command line.

License

Notifications You must be signed in to change notification settings

imbngy/pyTweetCli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTweetCli

Overview

PyTweetCli is a lightweight Python script for seamless Twitter tweet retrieval using Selenium via the command line. Easily fetch tweets by username or keyword with simplicity and efficiency.

Features

  • Command-line interface for quick tweet retrieval
  • Fetch tweets by username, keyword or link
  • Lightweight and user-friendly

Requirements

To run pyTweetCli, you need to have the following dependencies installed:

Getting Started

  1. Clone the repository:
git clone https://github.com/imbngy/pyTweetCli.git
  1. Navigate to the project directory:
cd pyTweetCli
  1. Install requirements:
pip install -r requirements.txt
  1. Run the script:
py main.py

The script will launch a headless Chrome browser, navigate to twitter.com, and scrape tweets by given input.

Usage

You can run the script with:

py main.py

or by adding a link argument:

py main.py -l https://twitter.com/tweet-link/example

Both cases it will ask you for a username, or email, and a password:

Enter your username/email:
Enter your password:

When you don't pass an argument, it will ask if you want to search by keyword or by user:

Select a search mode: 
1. Search by keyword
2. Search by user

Enter a number:

When searching by user, simply put whatever comes after the @, for example:

Enter the desired username: elonmusk

Output

PyTweetCli provides output in two ways:

  • CSV File: The script generates a CSV file with the fetched tweet data.
  • Command Line: The fetched tweets are also displayed in the command-line interface.

Enhance your tweet harvesting experience with PyTweetCli!

Contributing

Found a bug or have a suggestion? Open an issue or contribute to make PyTweetCli even better.

About

pyTweetCli: A Python script for effortless tweet retrieval using Selenium via the command line.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages