Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import twitter
from xlwt import Workbook
consumer_key = "xxxxxxx"
consumer_secret = "xxxxxxx"
access_token_key = "xxxxxxx"
access_token_secret_key = "xxxxxxxx"
api = twitter.Api(consumer_key=consumer_key,
consumer_secret=consumer_secret,
access_token_key=access_token_key,
access_token_secret=access_token_secret_key)
wb = Workbook()
sheet1 = wb.add_sheet('Following')
users = api.GetFollowers()
row = 0
column = 0
for user in users:
sheet1.write(row, column, user.name)
row += 1
wb.save('following list.xls')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment