Clean-up inactive accounts and bots from your Twitter
Project description
Twitter Clean-up
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 .
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
twitter-cleanup-0.0.7.tar.gz
(8.0 kB
view details)
File details
Details for the file twitter-cleanup-0.0.7.tar.gz
.
File metadata
- Download URL: twitter-cleanup-0.0.7.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69c6a83e2538fe1628639d55eea9ee7eb448cc879cb69819cfef867d3e2e3f84 |
|
MD5 | 3b09a41d0e6b065d9bd577143c3d260b |
|
BLAKE2b-256 | 086f3fa06321b6afb816251ac2da9bc1b6eb5027511a454a70f9d4a14e837aab |