Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv, math, time
- import twitter as twitterapi
- pwd='nopasswordforyou'
- api = twitterapi.Api(username='morisy', password=pwd)
- csvout=csv.writer(csvfile,dialect='excel')
- listofnames = file('listinput.csv').readlines()
- listifnames = [name.strip() for name in listofnames]
- for name in listofnames:
- print name
- account = api.GetUser(name)
- followers = account.followers_count
- print name + ", " + str(followers)
- csvout.writerow([name, followers])
- csvfile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement