mifi / instauto

Instagram bot / automation library written in Javascript for Node.js
799 stars 145 forks source link

Bot visits and keeps revisiting private and excludeUsers resulting in Too Many Requests #26

Open mrkrumhausen opened 4 years ago

mrkrumhausen commented 4 years ago

The bot could be much more effective if it ignored excludedUsers from search and stopped visiting them repeatedly - as this unnecessary traffic increases the risk of "Too Many Requests".

This could be implemented by:

  1. Storing excludeUsers, incl. private and accounts with wrong follow/following ratio in a json file.
  2. Filtering those users out in the "followUserFollowers"-function.

What do you think about this proposed enhancement?

mifi commented 4 years ago

Correct me if I'm wrong, but I believe you're confusing excludeUsers with something else. excludeUsers is a parameter to the bot which is a list of accounts that the bot should never follow/unfollow.

I think what you are asking is that the bot stores a separate json file with users that it has already visited, because it keeps visiting the users that it has already visited last time it ran, am I right? I believe the reason you are experiencing this is because your usersToFollowFollowersOf contains instagram accounts that don't get a lot of new followers every day, and thus it re-visits the old followers. Mine runs with usersToFollowFollowersOf accounts that have hundreds of thousands (or millions) of followers, so every day there are new followers.

mrkrumhausen commented 4 years ago

Yeah, I propose storing private and unwanted users (bots, etc.) to make the to more efficient - especially when following smaller accounts.