Created
October 28, 2012 19:50
-
-
Save sputnikus/3969657 to your computer and use it in GitHub Desktop.
Twitter list members stats
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import csv | |
from tweepy import Cursor | |
from tweepy import api | |
def run(): | |
members = Cursor(api.list_members, 'owner-name', 'list-slug').items() | |
with open('tw_list.csv', 'wb') as csvfile: | |
writer = csv.writer(csvfile) | |
print 'Killing birds' | |
for member in members: | |
writer.writerow((member.screen_name, member.statuses_count, | |
member.friends_count, member.followers_count)) | |
if __name__ == '__main__': | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment