the-convocation / twitter-scraper

A port of n0madic/twitter-scraper to Node.js.
https://the-convocation.github.io/twitter-scraper/
MIT License
211 stars 43 forks source link

getFollowers not returning all followers #69

Closed ThijnK closed 11 months ago

ThijnK commented 11 months ago

For some specific profiles, the getFollowers function consistently returns, say, the first 265 followers before exiting, even though the profile would have many more than that and the maxProfiles is set to max integer value. Some profiles work just fine, returning all (or the maxProfiles given) followers as expected. An example of a profile where this happens is @Stephen_961 (user id: 1511155833211658245).

Notably, it is not rate limits, the function actually returns. I've had this happen on multiple different machines, in different environments, and even when running the tests in this very repository. I narrowed the point where the function exits down to line 43 in file src/timeline-async.ts (i.e. it recieves empty list of profiles in a batch).

I've not tested if the same issue exists for the getFollowing function.

I should mention that I normally pass Number.MAX_SAFE_INTEGER for the maxProfiles argument in the getFollowing function.

If there's any ideas on why this might be happening or maybe what I'm doing wrong, it would be much appreciated!