mifi / instauto

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

Bot not unfollowing #52

Closed apollotsantos closed 2 years ago

apollotsantos commented 3 years ago

Hi,

For some reason my bot is not unfollowing as it should. Could you help me understandig three things?

  1. Does the bot follows or unfollows first when it start? (SimpleInstaBot unfollows first)
  2. How do I set the variable dontUnfollowUntilTimeElapsed? I don't seem to understand those multiplications
  3. Is there any difference between this and SimpleInstaBot, in terms of the pupeteer implementation?
mifi commented 3 years ago

Hi

  1. Currently it follows first. See https://github.com/mifi/instauto/blob/master/example.js I can change this so it instead unfollows first like SimpleInstaBot.
  2. 3 * 24 * 60 * 60 * 1000 means three days (in milliseconds). I'll update the example
  3. SimpleInstaBot doesn't use puppeteer, but it uses an electron window. which is also chrome and similar, but not exactly the same.
mifi commented 3 years ago

I have now updated the example

apollotsantos commented 3 years ago

Hi, please take a look at the following image. I've modified the example to unfollow first, and then follow. It seems that it reaches the daily limit, wait 10 minutes and unfollows more, until realising that the daily limit is already reached.

image

Note that I've got these results running the old example.js. I'll test the new and report back Edit: The behaviour is still present. This is the output:

image

mifi commented 3 years ago

when starting up, what does it say about this?

  logger.log(`Have followed/unfollowed ${getNumFollowedUsersThisTimeUnit(hourMs)} in the last hour`);
  logger.log(`Have followed/unfollowed ${getNumFollowedUsersThisTimeUnit(dayMs)} in the last 24 hours`);
  logger.log(`Have liked ${getNumLikesThisTimeUnit(dayMs)} images in the last 24 hours`);

and what's your daily limit and your other parameters?

apollotsantos commented 3 years ago

Please take a look at the following image

image

My daily limit is set to 120 and 10/hour

mifi commented 3 years ago

Those are automatically issued when starting up, no?

apollotsantos commented 3 years ago

Yes, my bad. I've edited my comment with the results. It seems that the action count was 143 while my limit was 120. Also, after that, it started searching for people to follow, and now the bot is following people without recognizing the limit

mifi commented 3 years ago

if it had followed 143 the last 24 hours and your limit is 120, then that explains why it diddn't want to follow/unfollow any more. if it is started following again, then it should be because time has passed so that there is no longer 143 followed last 24 hours (maybe some time passed). it continously calculates a window of actions in the previous 24 hours

doge0007 commented 2 years ago

hello, the bot does not stop following. button not found

unf

mifi commented 2 years ago

@doge0007 please provide a screnshot of the browser window when the error occurs and a html dump of the button using developer tools

doge0007 commented 2 years ago

error unfollow

mifi commented 2 years ago

is this still happening with the newest version? would be nice to see how the html of the unfollow button looks like

doge0007 commented 2 years ago

Hello, after the previous version I have not had that problem at the moment. Thank you!

mifi commented 2 years ago

cool!