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)
- Python 3.6+
- Set environment variables with your Twitter API keys and with Botometer API key:
TWITTER_CONSUMER_KEYTWITTER_CONSUMER_SECRETTWITTER_ACCESS_TOKEN_KEYTWITTER_ACCESS_TOKEN_SECRETBOTOMETER_MASHAPE_KEY
Install the package with:
$ pip install twitter-cleanupRun 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 30Or soft-block every bot with:
$ twitter-cleanup bots
Please, write and run tests locally, and format your code with Black:
$ python setup.py test
$ black .