Created
February 12, 2022 15:18
-
-
Save Fluepke/d588cd7262cc2468568cacdb9e7a1367 to your computer and use it in GitHub Desktop.
Nuke followers of a Twitter account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import tweepy | |
import sys | |
from tqdm import tqdm | |
print(f"Nuking {sys.argv[1]}") | |
consumer_key = '<redacted>' | |
consumer_secret = '<redacted>' | |
access_token = '<redacted>' | |
access_token_secret = '<redacted>' | |
allow_list = [ '<redacted, *sigh*>'] | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_token, access_token_secret) | |
api = tweepy.API(auth) | |
for i in tqdm(tweepy.Cursor(api.get_follower_ids, screen_name=sys.argv[1]).items()): | |
if str(i) in allow_list: | |
continue | |
api.create_block(user_id = i) | |
print('Blocking done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get required tokens and secrets from https://developer.twitter.com