Created
September 28, 2019 16:11
-
-
Save miguelgarcia/bd513d5deb0fd59b1404a86c146c8410 to your computer and use it in GitHub Desktop.
Script to unmute all muted accounts in twitter
This file contains 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
import tweepy | |
# Install tweepy with `pip3 install tweepy` | |
# See https://realpython.com/twitter-bot-python-tweepy/ for info about how to generate credentials | |
consumer_key = '' | |
consumer_secret = '' | |
access_token = '' | |
access_token_secret = '' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_token, access_token_secret) | |
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True) | |
api.verify_credentials() | |
for u in tweepy.Cursor(api.mutes).items(): | |
print(f"Unmutting {u.screen_name}") | |
api.destroy_mute(u.id) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What if I wanted it to do the opposite by muting all unmuted accounts (my goal is to mute every person in my twitter and just post without consuming, but keeping them as "friends")