Search code examples
pythontwittertweepy

Is there a way to jump pages with a tweepy cursor?


I'm trying to get followers from a big account using tweepy. When the job was half done, something gone wrong and I had to start again.

I'd like to know if there is a way to jump directly to page X and avoid reiterating all the pages?


Solution

  • The search method accepts a parameter page which can be used to jump to a particular page (in combination with rpp). If you are using Cursor, these parameters can be passed as named parameters to its constructor, i.e., tweepy.Cursor(api.search, page = ...)