|
|
scriptsPoBoy Twitter Tracker 0.1: A small Python script to collect follower counts
The following Python script simply reads through a text file to find out the Twitter accounts you want to check, and then spits back those account names and how many followers each of those accounts has:
#pwd='***' listofnames = file('twitterusers.txt').readlines() csvfile=open('twittercounts.csv','ab') for name in listofnames: csvfile.close() Note that this script requires the Python Twitter wrapper, although it just barely taps into that wrapper's functionality (Note that the script doesn't even require a username or password to work!). To run it, after installing the Python Twitter wrapper, put the script and a plain text file with the usernames you want to scan (one per line, no commas) into the same directory. Note that right now, there is no error checking, so if one of the usernames is mistyped, is deleted or changed, the script will probably crash. I plan on fixing this in the next release. It's fairly trivial to expand the functionality to include the number of people that user is following, the latest updates, etc., and for that I highly recommend Amy Iris' tutorial on Twitter tracking in Python; I simply needed something a little more basic and that output into an Excel-compatible file.
|