Skip to main content

A small python script that allows you to delete your old tweets.

Project description

Twitter Cleaner

A small python script that allows you to delete your old tweets.

Installation

Use pip:

pip install twitter_cleaner

How to use

  1. Apply for a Twitter Developer Account.
  2. While you wait for Twitter to review and approve your Developer Account, download your Twitter archive. Twitter limits the access of the tweets by the API, so the only way to retrieve your old tweets is using the Twitter archive.
  3. When you receive your archive, you should look for a JS file with contains all your tweets (tweet.js).
  4. After the approval of your Twitter Developer Account, create an app. Don't forget: you should set Read and Write in the Access Permissions settings.
  5. Open the details page of the app that you created. Go for the Keys and Tokens tab. You will need the consumer and access token keys to use Twitter Cleaner.
  6. Run:
python -m twitter_cleaner --consumer_key <consumer-key> \\
       --consumer_secret <consumer-secret>   \\
       --access_token_key <access-token-key> \\
       --access_token_secret <access-token-secret> \\
       --older_than <date in YYYY-MM-DD format> \\
       --file <path/to/tweet.js>

Filters

There are two filters available: filter tweets older than a date AND filter tweets newer than a date. If you need more filtering options, like filter tweets with less (or more) than a specific amount of engagement, please ask.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for twitter-cleaner, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size twitter_cleaner-0.3.0-py2.py3-none-any.whl (17.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size twitter_cleaner-0.3.0.tar.gz (17.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page