-
-
Save jamesturk/60d54c39717121f8db4dc1191ce95f1d to your computer and use it in GitHub Desktop.
scripts to help manage twitter account
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 twitter | |
import csv | |
# get these from https://apps.twitter.com/app/new | |
api_key = '' | |
api_secret = '' | |
access_key = '' | |
access_secret = '' | |
api = twitter.Api(consumer_key=api_key, consumer_secret=api_secret, | |
access_token_key=access_key, access_token_secret=access_secret) | |
with open('following.csv', 'w') as f: | |
out = csv.writer(f) | |
for friend in api.GetFriends(skip_status=True): | |
out.writerow((friend.name, friend.screen_name, friend.created_at, | |
friend.followers_count, friend.protected, friend.id, | |
#friend.status.created_at | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment