Cursors / Pagination for another user's followers..

1,008 views
Skip to first unread message

DennisPi

unread,
Jun 19, 2011, 10:40:08 PM6/19/11
to tweepy
Hello All,

I'm trying to get a complete list of a user's followers.

I get the user by calling (note: I don't want the authenticated user's
followers... I want a specified user's followers..) thus:

user = tweepy.api.get_user("ev")

I realize that user.followers() only contains 100 followers... and
thus the need for pagination.

I've been trying: for x in Cursor(user.followers).items():

But I get the error: "This method does not perform pagination"

What should I be doing instead?

Thanks!
Dennis

theoretical

unread,
Aug 1, 2011, 4:41:32 PM8/1/11
to tweepy
did you get this figured out?

Correa Denzil

unread,
Aug 2, 2011, 1:02:36 PM8/2/11
to twe...@googlegroups.com

follower_cursors = tweepy.Cursor(api.followers, id = screen_name)

for follower_cursor in follower_cursors.items():

     follower_cursor.screen_name



I think this should work. It works for me.


--Regards,
Denzil

shikh...@gmail.com

unread,
Jun 24, 2013, 3:17:53 PM6/24/13
to twe...@googlegroups.com, mce...@gmail.com, vonrey...@gmail.com
Hi All,

I am trying to do the same thing with followers_ids but it is not working for me. Is it something to do with the version.

On Thursday, 22 November 2012 23:50:58 UTC-5, vonrey...@gmail.com wrote:
Greatk, it worked for me!

drev...@gmail.com

unread,
Jul 3, 2013, 9:48:23 PM7/3/13
to twe...@googlegroups.com, mce...@gmail.com, vonrey...@gmail.com, shikh...@gmail.com
This works :

          iterator = Cursor(apiCall, user_id=userId).pages()
          for ids in iterator:
               ....

here, ids is a list of user ids (numbers)
Ian
Reply all
Reply to author
Forward
0 new messages