Forceflow / twitter_blocklist_exporter

Script to download your Twitter blocklist and export it to various formats
GNU General Public License v3.0
2 stars 1 forks source link
backup blocklist moderation twitter

twitter_blocklist_exporter v0.2

This is a Python3 script that uses the Twitter API to download your Twitter blocklist or mutelist and generate a HTML file with all usernames listed and clickable. You can use this list as a reference to share, mute or block unwanted accounts elsewhere.

This script was created because blocklist/mutelist exporting/importing, introduced on the platform in 2015, has been absent without notice since 2019.

Running

Requirements

Python 3 with the Tweepy library is required. Install it using pip3 install tweepy or through your distribution package manager. You also need Twitter API keys. Check the section below on how to generate them.

Sample output

Twitter Blocklist exporter v0.2 - https://github.com/Forceflow/twitter_blocklist_exporter
---
Loading Twitter API keys from file
Authenticating with Twitter
Grabbing blocklist
279 blocked accounts found. Writing to blocklist.html
Done. Exiting.
Sample Output

Generate API tokens

In order to query and download your blocklist/mutelist, this script needs API tokens that you need to provide in a keys.json file in the same directory as the script.

At the time of writing (10-03-2023), this is how you generate the tokens required to export your blocklist/mutelist. Also at the time of writing, this functionality still is free for a limited amount of requests. Tweepy batches the requests as much as possible.

Todo