Using Twython to collect Follower ID




When I collect the ID’s of user, I can get the IDs of 5,000 of their followers. However, even when I call the function over and over again, I still get the IDs of the same 5,000 followers. I’m wondering how may I get the IDs of all their users?

For example;

from twython import Twython

twitter = Twython()
followers = twitter.get_followers_ids(screen_name = "someone")

This code will only return 5,000 of the same followers.


That’s correct - the followers API returns 5,000 IDs per page. I don’t know what the Twython syntax is for paging into the next set of followers. It looks like it should just mirror the Twitter API parameters, so you’d add cursor = "value" to the call to page into the next 5,000.