Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

cuducos/twitter-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Clean-up GitHub Actions: Black workflow GitHub Actions: Tests workflow

🇧🇷 Versão em português do Brasil

Tiny script to clean-up your Twitter account:

  • Removing users that have not been tweeting for a while
  • Soft-blocking bots (blocks and immediately unblocks the account, so it stops following you)

Requirements

  • Python 3.6+
  • Set environment variables with your Twitter API keys and with Botometer API key:
    • TWITTER_CONSUMER_KEY
    • TWITTER_CONSUMER_SECRET
    • TWITTER_ACCESS_TOKEN_KEY
    • TWITTER_ACCESS_TOKEN_SECRET
    • BOTOMETER_MASHAPE_KEY

Installing

Install the package with:

$ pip install twitter-cleanup

Usage

Run the CLI with twitter-cleanup --help and follow the on screen instructions.

For example, unfollow everyone that hasn't tweeted in the last 30 days with:

$ twitter-cleanup inactive 30

Or soft-block every bot with:

$ twitter-cleanup bots

Contributing

Please, write and run tests locally, and format your code with Black:

$ python setup.py test
$ black .