Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function get_user_followers() does not work as expected due to API limitations #49

Open
Fab-Ko opened this issue Jun 13, 2022 · 1 comment

Comments

@Fab-Ko
Copy link
Contributor

Fab-Ko commented Jun 13, 2022

Hello,
as implemented right now, the function simply does not work as expected.

The function get_user_followers defined here does not return all followers.
According to the API documentation only 20 entries (default) but at maximum 100 entries are returned.

Possible Solutions:

  • Enhance the function to download all pages and collect all followers. BUT: In channels with many followers, the download of the complete list is not even useful. This could consum a huge amount of memory.
  • Remove the follower list and only grab the statistical data like for example number of followers. Add a function which enables the bot owner to download the information specific to a user. Done in the pull request here

Maybe someone has a better solution.

@sharkbound
Copy link
Owner

i will look at those PR's when i can, as for the limitations, i was aware of them from the start, i just included all the json fields that the api returned.
IIRC, followers are a paged api, meaning it can eat up available api calls until it resets very quickly if called often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants