1 # For each of your followers, find out how many followers they have.
5 from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
8 auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
9 auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
11 api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
13 user = api.get_user("makoshark")
15 for follower in user.followers():
16 print("%s : %s" % (follower.screen_name, follower.followers_count))
18 # According to this page, we can make 180 requests for user
19 # information each 15 minute period or one every 5 seconds:
21 # https://dev.twitter.com/rest/reference/get/users/show