Export and import Twitter blocklists
Project description
twitter_blocklist
Export and import Twitter blocklists.
twitter_blocklist
provides a command-line tool to export a list of all
the accounts you block to a text file:
$ twitter_blocklist --export my_blocks.csv
or import a list from someone else, or downloaded from https://blocktogether.org:
$ twitter_blocklist list_to_import.csv
or block all member of a Twitter list:
$ twitter_blocklist --list <list_id>
undo blocking with the --unblock flag:
$ twitter_blocklist --unblock --list <list_id>
$ twitter_blocklist --unblock list_to_unblock.csv
The files have a CSV extension but they are actually just text files with 1 Twitter user ID per line.
Install
$ pip install twitter_blocklist
Initial setup
Create a Twitter app following the instructions from the python-twitter
project
Create a text file named twitter_keys.toml
with this format:
consumer_key='xxxxxxxxxxxxxxxxxxxxxxxxx'
consumer_secret='xxxxxxxxxxxxxxxxxxxxxxxxx'
access_token_key='xxxxxxxxxxxxxxxxxxxxxxxxx'
access_token_secret='xxxxxxxxxxxxxxxxxxxxxxxxx'
Make sure you have the single quotes.
From the same folder where you have twitter_keys.toml
, run the tool as shown above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for twitter_blocklist-0.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87d146a82996b989f6eab97e2b70bc6fef46421ce125657cba090332e5d6513f |
|
MD5 | 7fbe241baa1d1c6e304fa651e47e6ea6 |
|
BLAKE2b-256 | 631b9e0b77b5ebde1fdd369e031ff8906cd6fef571b817f8addf291eb672b750 |