Skip to content

The "Python Twitter Tweet Deleter" is a Python script that uses the Tweepy library to authenticate with the Twitter API and delete multiple tweets based on their tweet IDs. The script reads tweet IDs from multiple JSON files, which contain a list of tweets in a specific format.

License

Notifications You must be signed in to change notification settings

isrgrajan/Python-Twitter-Tweet-Deleter

Repository files navigation

Python Twitter Tweet Deleter Script 2024

This project contains a Python script for deleting tweets from a Twitter account using the Tweepy library.

Requirements

To use this script, you must have the following installed:

  • Python 3
  • Tweepy library
  • Twitter API authentication details (consumer key, consumer secret, access token key, and access token secret)

Installation

If you don't have the Tweepy library installed, you can install it using pip:

pip install tweepy

Usage

To use the script, follow these steps:

  1. Clone this repository or download the script file.
  2. Replace the Twitter API authentication details in the script with your own details.
  3. Save the tweet IDs you want to delete in separate JSON files with the format as follows:
[    {        "tweet": {            "id": "<tweet_id>"        }    },    ...]

  1. Update the files list in the script with the names of the JSON files containing the tweet IDs.
  2. Run the script using the command:
python tweet_deleter.py

The script will loop through each tweet ID in the JSON files and attempt to delete the corresponding tweet. The script will display the deletion status for each tweet.

Functions

The script includes the following functions:

  • show_authorization_status(): Displays the current status of Twitter API authorization.
  • install_missing_libraries(): Checks if the required libraries are installed and installs them if they are missing.

Author

This script was written by Isrg Rajan.

Release Information

  • Released on: 11-04-2023
  • Tested on: 22:00 IST 11-04-2023

About

The "Python Twitter Tweet Deleter" is a Python script that uses the Tweepy library to authenticate with the Twitter API and delete multiple tweets based on their tweet IDs. The script reads tweet IDs from multiple JSON files, which contain a list of tweets in a specific format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages