mifi / instauto

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

Multiple login attempts unnecessarily #121

Closed otomay closed 2 years ago

otomay commented 2 years ago

I'm getting softban and I believe it's due to the amount of logins the bot does. The activities contain various information about "An unrecognized Windows PC just connected", "A Linux PC...", "A MAC OS X...", "An Apple Iphone". For what reason does this happen? I am using the example script.

mifi commented 2 years ago

the bot is onlt supposed to do 1 login and then remember cookies so i dunno why it's doing many. as of different OS'es, probably related to https://github.com/mifi/SimpleInstaBot/issues/119 you can try to explicitly set the user agent.

otomay commented 2 years ago

Thank you! I'll try later and let you know. How can I do it?

randomizeUserAgent: false,
userAgent: Chrome

?

Also, I'm trying to hide puppeteer, like you mentioned on another issue (and it's working):

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());

But the massive infos of new login was happening even with the base puppeteer, so I don't think that this is the problem

mifi commented 2 years ago

correct

otomay commented 2 years ago

Apparently the problem with multiple logins didn't happen now. I disabled headless mode and I didn't notice any difference in using userAgent: 'Chrome' or userAgent: 'Mozilla'... it keeps opening through chromium, so I believe it's just what the bot tells instagram.

I'll leave it running for the next few days and see if I get another softban... the last one happened when the day of unfollows arrived. I wasn't using the StealthPlugin before, so I'm a little more confident this time.