Skip to content

Python app for obtaining twitter information using the Twint-Zero program.

License

Notifications You must be signed in to change notification settings

PG-Insights/Twint_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twint Zero API Twitter Query

This script runs a "Twint Zero" API Twitter query and returns the results in CSV format. It uses the main.go script from zedeus/nitter to perform the query.

Prerequisites

Before using this script, please make sure you have the following software installed:

  • Go 1.16 or higher
  • Twint Zero
  • Python 3.10 or higher
  • pip install pandas

To install Twint Zero, follow these steps:

  1. Clone the Twint Zero repository to your local machine:

    git clone https://github.com/PG_Insights/Twint_API
  2. Navigate to the cloned repository:

    cd Twint_API
  3. Initialize the Go module:

    go mod init twint-zero
  4. Tidy the Go module:

    go mod tidy

    Twint Zero was created by Francesco Poldi, with contributions from Simon Archer.

    Francesco Poldi

    Simon Archer: JSON formatting and attachments parsing

Usage

  1. Clone this repository to your local machine
  2. Open your terminal and navigate to the directory where you cloned the repository
  3. Run the following command to install the Python dependencies:
pip install -r requirements.txt
  1. Run the script using the following command:
python twint_api.py [query]

Usage

  1. Clone this repository to your local machine

  2. Open your terminal and navigate to the directory where you cloned the repository

  3. Run the following command to install the Python dependencies:

    pip install -r requirements.txt
  4. Run the script using the following command:

    python main.py [query]

    where [query] is a string representing your Twitter query as described in igorbrigadir/twitter-advanced-search.

    This will run a Twitter query based on the given query string and save the result in CSV format.

    By default, the script uses the birdsite.xanny.family instance of nitter, but you can modify this by changing the -Instance parameter in the return_query_results() function in main.py.

Output

The CSV file will be saved in the twint-responses directory in the same directory as the script, and will be named with the date and time of the query and the query string used for the query.

Contributing

If you would like to contribute to this project, please feel free to create a pull request or open an issue.

Questions/Issues

If you have any questions or issues with this script, please feel free to fork it and fix it yourself.

License

This project is licensed under the MIT License.

Credits

This project was created by Dale Ludwinski for Let MO Play.

Visit us on Twitter.

About

Python app for obtaining twitter information using the Twint-Zero program.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published