Skip to content

Instantly share code, notes, and snippets.

@pluser
Created January 3, 2018 10:04
Show Gist options
  • Save pluser/a91bdc80dbc9caff2d606c5e517a58b1 to your computer and use it in GitHub Desktop.
Save pluser/a91bdc80dbc9caff2d606c5e517a58b1 to your computer and use it in GitHub Desktop.
Dump my own followers
#!/usr/bin/python3
import os
import tweepy
CONSUMER_KEY=os.getenv('TW_CONSUMER_KEY')
CONSUMER_SECRET=os.getenv('TW_CONSUMER_SECRET')
ACCESS_TOKEN=os.getenv('TW_ACCESS_TOKEN')
ACCESS_TOKEN_SECRET=os.getenv('TW_ACCESS_TOKEN_SECRET')
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
tw = tweepy.API(auth, wait_on_rate_limit=True)
for u in tweepy.Cursor(tw.followers).items():
print(u.screen_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment