I am using tweepy library to run the following code snippet:

api.followers(id=714464982)

If I look at the number of followers returned it is just 20 users


len(api.followers(id=714464982))

I would like to get the rest so I checked the docs

My beginner question is how to move the cursor, I would like to get the full list of followers (over 5000) so I need to repeat this operation a few times to get the full list. Thanks a lot! :grinning_face_with_smiling_eyes:

Sure, except you have to use a Cursor and tell it to wrap the function instead: Cursor Tutorial — tweepy 3.10.0 documentation and process them as items or pages.

I would also set count=5000 to get the most out of the rate limits.

tweepy.Cursor(api.followers, id=714464982, count=5000)
1 Like