Search code examples
apitwitter

In the Twitter API, is there a way to get all the values for cursor_next without having to make a call each time?


I want to get all followers of a particular account but I want to do this using multiple apps rather than a single app. The idea is to speed up the process instead of one app doing all the requests. But how do I make sure that the different apps will pull sets of followers that won't overlap?

I've read the documentation for Tweepy and it looks like that next_cursor is only available after every call. I was thinking if there is a way to get all of these values beforehand, then each app can be assigned different pages to pull from and run at the same time. (I'm also open to ideas if this can be done in a different language apart from Python.)

So if the user has 1,000 followers, then the idea is that two different apps can run at the same time wherein the first app pulls followers 1-500 and the second app pulls followers 501-1,000.


Solution

  • No, this is not possible. I think a better approach would be to put each request into a separate thread rather than a separate app. This way you can spawn successive requests before waiting to process the returned data.