Created
December 29, 2021 22:11
-
-
Save tveastman/dca883a769295a379259397225b3babd to your computer and use it in GitHub Desktop.
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 os | |
from TwitterAPI import TwitterAPI | |
api = TwitterAPI( | |
consumer_key=os.environ["CONSUMER_KEY"], | |
consumer_secret=os.environ["CONSUMER_SECRET"], | |
access_token_key=os.environ["ACCESS_TOKEN"], | |
access_token_secret=os.environ["ACCESS_TOKEN_SECRET"], | |
) | |
for id in api.request("friends/ids").get_iterator(): | |
r = api.request(f"friendships/destroy", dict(id=id)).json() | |
print(f"{r['name']} (@{r['screen_name']})") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment