]> projects.mako.cc - twitter-api-cdsw-solutions/blob - twitter2.py
change variable name to make it more clear
[twitter-api-cdsw-solutions] / twitter2.py
1 import encoding_fix
2 import tweepy
3 from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
4
5 auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
6 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
7
8 api = tweepy.API(auth)
9
10 user = api.get_user('makoshark')
11
12 print(user.screen_name + " has " + str(user.followers_count) + " followers.")
13
14 print("They include these 100 people:")
15
16 for follower in user.followers(count=100):
17    print(follower.screen_name)
18

Benjamin Mako Hill || Want to submit a patch?