InstaPy / InstaPy

đź“· Instagram Bot - Tool for automated Instagram interactions
GNU General Public License v3.0
16.84k stars 3.78k forks source link

Sad, sad day... New Instapy is still detected immediately by Instagram #4905

Closed Tachenz closed 5 years ago

Tachenz commented 5 years ago

So, on the last Instapy version (where it runs as mobile, on firefox, without headless and trying to mask selenium activity), while logged off from the instagram app, after a 3 week break of using the bot...

...it gets blocked after 2nd(!) follow. When I log in manually from my browser and go on following spree - it does not get blocked.

Are there any ideas still in dev to defeat the evil Instagram or no chance at this point?

ghost commented 5 years ago

Try use 4g or residential proxy. I have the same problems. Several reactions - block. On the Instagram app and browsers, manually, everything works correctly.

amatadev98 commented 5 years ago

Currently I'm not facing any issues when im not exceeding the limits. Seems like this bot detection doesn't affect all of instagram accounts. How many accounts do you have?

Tachenz commented 5 years ago

Currently I'm not facing any issues when im not exceeding the limits. Seems like this bot detection doesn't affect all of instagram accounts. How many accounts do you have?

Just one account, residential IP. Going VERY slowly (1 like per 30 minutes), 1 follow per 3 likes randomized delays. If I log in into browser manually, I can like and follow whatever I want. With Instapy - blocked after 1st follow (2nd follow did not get through). No block in the App.

Really weird.

amatadev98 commented 5 years ago

Currently I'm not facing any issues when im not exceeding the limits. Seems like this bot detection doesn't affect all of instagram accounts. How many accounts do you have?

Just one account, residential IP. Going VERY slowly (1 like per 30 minutes), 1 follow per 3 likes randomized delays. If I log in into browser manually, I can like and follow whatever I want. With Instapy - blocked after 1st follow (2nd follow did not get through). No block in the App.

Really weird.

There are some APIs that instagram uses to get usage patterns. I want you to do these steps to block these APIs to see what happens.

  1. Open chrome browser manually and remove all instagram cookies.
  2. Open https://www.instagram.com and right click on page and select Inspect to open developer tools.
  3. Under 'request blocking' tab , check 'Enable request blocking' and use that + button to add these URLs and enable all of them:

graph.instagram.com/logging_client_events www.instagram.com/ajax/bz www.facebook.com/ajax/bz www.instagram.com/logging/falco

inspect

  1. Now login to instagram. Do not close the tab or change it.
  2. Start follow some people and see if you get block message.

Remember, liking posts in web may get blocked but you will not notice it because instagram will not show block message for like in web browser sometimes.

Tachenz commented 5 years ago

Thank you @MHzCode - but the new version of instapy 0.6.2 runs only in Firefox. Does it still make sense to do these in Chrome?

amatadev98 commented 5 years ago

Thank you @MHzCode - but the new version of instapy 0.6.2 runs only in Firefox. Does it still make sense to do these in Chrome?

Don't use instapy just use normal chrome browser and do steps manually.

amatadev98 commented 5 years ago

Thank you @MHzCode - but the new version of instapy 0.6.2 runs only in Firefox. Does it still make sense to do these in Chrome?

Actually i want to see if instagram uses these data to block people. If you get blocked by blocking these URLs , it means instagram actually uses some sort of usage patterns to block people.

Tachenz commented 5 years ago

@MHzCode Gotcha. Look. But that is exactly what I am saying. If I log in manually - I can keep liking/following all day.

I logged in just now, from the same computer, manually from Chrome (did not even disable anything yet) - and withing a few minutes followed 10 accounts. And liked 3 posts per account for each of them. Like at the speed of 1 like per 5 seconds. No problems.

But on instapy I get blocked on the second follow. They CLEARLY know how to detect one. Even the new (mobile, headless disabled, firefoxed version).

Just for the heck of it, followed 15 more users straight from someone else "following" menu. so 25 follows in browser, manually, in under 10 minutes. No problem.

Need to write a clicking bot, I guess...

ShubhamBhatt commented 5 years ago

any luck running the script please tag me if you guys find any soluton. i get this

INFO [2019-08-19 21:16:13] [desklabs.in] - Instagram Response Time: 43.708 ms INFO [2019-08-19 21:16:13] [desklabs.in] - Instagram Reponse Code: 200 INFO [2019-08-19 21:16:13] [desklabs.in] - Instagram Server Status: ok INFO [2019-08-19 21:16:14] [desklabs.in] -- Connection Checklist [3/3] (Hide Selenium Extension) INFO [2019-08-19 21:16:14] [desklabs.in] - window.navigator.webdriver response: False INFO [2019-08-19 21:16:14] [desklabs.in] - Hide Selenium Extension: ok Cookie file not found, creating cookie... Login A/B test detected! Trying another string...

ghost commented 5 years ago

Gotcha. Look. But that is exactly what I am saying. If I log in manually - I can keep liking/following all day.

I logged in just now, from the same computer, manually from Chrome (did not even disable anything yet) - and withing a few minutes followed 10 accounts. And liked 3 posts per account for each of them. Like at the speed of 1 like per 5 seconds. No problems.

But on instapy I get blocked on the second follow. They CLEARLY know how to detect one. Even the new (mobile, headless disabled, firefoxed version).

Just for the heck of it, followed 15 more users straight from someone else "following" menu. so 25 follows in browser, manually, in under 10 minutes. No problem.

Need to write a clicking bot, I guess...

I have the same ... I tried everything.

amatadev98 commented 5 years ago

@MHzCode Gotcha. Look. But that is exactly what I am saying. If I log in manually - I can keep liking/following all day.

I logged in just now, from the same computer, manually from Chrome (did not even disable anything yet) - and withing a few minutes followed 10 accounts. And liked 3 posts per account for each of them. Like at the speed of 1 like per 5 seconds. No problems.

But on instapy I get blocked on the second follow. They CLEARLY know how to detect one. Even the new (mobile, headless disabled, firefoxed version).

Just for the heck of it, followed 15 more users straight from someone else "following" menu. so 25 follows in browser, manually, in under 10 minutes. No problem.

Need to write a clicking bot, I guess...

Yes i know. I just want to make sure that this type of block (login block) occurs because of these APIs. Then i can try to reverse-engineering request-responses of these APIs to somehow bypass bot detection.

Tachenz commented 5 years ago

@MHzCode if I can help in any way- just let me know. I am happy to test anything But yeah, to answer your question. Manual log in - no block. "Firefox is being controlled by automated software" type of log in - block within minutes

jeremycjang commented 5 years ago

@mhzcode when you’re action blocked and the like request gets sent from the browser (as a POST with a specific URL path containing /web/), the 400 response gets returned immediately with a JSON body parameter saying the action was spam.

Because of that, I don’t think those API requests are being used to determine who to block

amatadev98 commented 5 years ago

@MHzCode when you’re action blocked and the like request gets sent from the browser (as a POST with a specific URL path containing /web/), the 400 response gets returned immediately with a JSON body parameter saying the action was spam.

Because of that, I don’t think those API requests are being used to determine who to block

Those APIs are used to log client actions to instagram servers (like scrolling , clicking , loading new content , impressions and so on). Blocking them means that information like scrolling and clicking will not be send to instagram servers and we want to make sure that those APIs can be responsible for getting blocked by instagram. What do you mean ?

ghost commented 5 years ago

any luck running the script please tag me if you guys find any soluton. i get this

INFO [2019-08-19 21:16:13] [desklabs.in] - Instagram Response Time: 43.708 ms INFO [2019-08-19 21:16:13] [desklabs.in] - Instagram Reponse Code: 200 INFO [2019-08-19 21:16:13] [desklabs.in] - Instagram Server Status: ok INFO [2019-08-19 21:16:14] [desklabs.in] -- Connection Checklist [3/3] (Hide Selenium Extension) INFO [2019-08-19 21:16:14] [desklabs.in] - window.navigator.webdriver response: False INFO [2019-08-19 21:16:14] [desklabs.in] - Hide Selenium Extension: ok Cookie file not found, creating cookie... Login A/B test detected! Trying another string...

Check this: https://github.com/timgrossmann/InstaPy/issues/4877#issuecomment-522282119

ghost commented 5 years ago

Ok, after about a month in which I have run InstaPy on a VM inside my Synology NAS at home (CentOS) with two my accounts without any issue, I got blocked last week, firstly on one account, then on the second (during the weekend). I just tried the new version of InstaPy, result: blocked again after 10 likes.

Tachenz commented 5 years ago

Yeah, that looks like they figured Instapy out somehow :( The sad part is that some paid "bots" still work...

masto182 commented 5 years ago

Would it be possible to use Android emulation and automated app testing tools to simulate human-like behaviour?

Tr1pke commented 5 years ago

Yeah, that looks like they figured Instapy out somehow :( The sad part is that some paid "bots" still work...

how do you know and can you give an example of a bot/website?

Tachenz commented 5 years ago

@Tr1pke bastards never stopped commenting under my photos/following me :P

e1x4 commented 5 years ago

Would it be possible to use Android emulation and automated app testing tools to simulate human-like behaviour?

maybe with the bluestack android emulator...

mdx4rs commented 5 years ago

Also blocked even after 1 like. Never used the bot excessively.

Sent with GitHawk

dsmh commented 5 years ago

Would it be possible to use Android emulation and automated app testing tools to simulate human-like behaviour?

This would be a great aproach. The definitive fix.

jm-willy commented 5 years ago

@masto182 @dsmh There's already a python bot using android: https://github.com/instabot-py/instabot.py. Is a totally different thing and in my opinion by using an unofficial api they're asking to get banned. This project can be protected against bans in many simple ways: https://github.com/timgrossmann/InstaPy/issues/4891

Tachenz commented 5 years ago

Have you tried that one? Does it work?

jm-willy commented 5 years ago

I have tried with their API, the bot part made by myself and worked

dsmh commented 5 years ago

@masto182 @dsmh There's already a python bot using android: https://github.com/instabot-py/instabot.py. Is a totally different thing and in my opinion by using an unofficial api they're asking to get banned. This project can be protected against bans in many simple ways: #4891

I had been trying this bot on the lastest days, because Instapy is not working anymore on my Raspi since the "firefox update", but as @jm-willy said: "using an unofficial api they're asking to get banned" and that is totally true. However there is an acount (just one out of 9) that is doing pretty well with this bot and I don't have idea why.

I think InstaPy has a great future if the funcionality mentioned on #4891 is implemented, however, all we know they are hard to implement.

Tachenz commented 5 years ago

So, no luck with it still...

valdilei commented 5 years ago

I tryed block various traffics (MHzCode tip) in my bot (created in c# with selenium) works one day, after: block 3 days! :(

marcosgb commented 5 years ago

Same problem here! Any solutions?

hijak commented 5 years ago

very odd seeing as its pretty much instant now. My suspicions lead me to believe the start up sequence intsapy runs thru is being detected

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

codypratt22 commented 4 years ago

So I put instapy to sleep for about 15-30 seconds during whatever interaction then I logged out and logged back in and after that instapy works again. I do run it on a mac so Im forced to use firefox as I couldn't get chromedriver to work for whatever reason but on ubuntu chrome works without issue so it must be something to do with firefox. I will update if they catch on and i my actions get blocked again but hopefully not.

Maybe a code thats logs the user out and logs back in after the initial profile check?

jeremycjang commented 4 years ago

@codypratt22 Very interesting. So you logged in/out manually? Looking forward to updates.

Can confirm that I've tried logging out and and in again on a web browser and used another auto-like extension and was later blocked/detected; this was a few months ago around the original time of this post

codypratt22 commented 4 years ago

@jeremycjang yea i got rid of action blocked problem but i noticed they catch on with try again later at around 100-200 server calls so i sleep the hourly after 100. but its a different message. I'm having no more action blocked message, more so the "try again in a few minutes" when i go to user profiles. So hopefully the server call sleep takes care of this. also I edited the instapy.py file to sleep randomly between 15-45 seconds. for scrolling and in between browsing images.

I think it should after about a half hour or so if i turn it on again it normally works.

bizzyman commented 4 years ago

@codypratt22 has this continued to work?

Wernerlang commented 4 years ago

Has anyone solved the instagram block problem? I am assuming all actions need to be randomised when it comes to time in between actions, but i am not sure how to do that. Does anyone know? Thanks in advance. Kind regards.

GabrieleAnsaldo commented 4 years ago

So I actually found a fix if you really want to have an instagram bot. Basically instagram got very good at detecting bots so I tried to work around that. Basically I have connected my old android phone to the Raspberry (you can connect it to any computer) and I just send a bunch of adb commands to it. I wrote a little script. Its been working so well.

I guess instagram finds it hard to find bots from someone using the app itself and not the browser version.

Hit me up if you are interested in developing this project with me, there is still a lot to do to make it very efficient.

MarcoLavoro commented 3 years ago

So I actually found a fix if you really want to have an instagram bot. Basically instagram got very good at detecting bots so I tried to work around that. Basically I have connected my old android phone to the Raspberry (you can connect it to any computer) and I just send a bunch of adb commands to it. I wrote a little script. Its been working so well.

I guess instagram finds it hard to find bots from someone using the app itself and not the browser version.

Hit me up if you are interested in developing this project with me, there is still a lot to do to make it very efficient.

this seems interesting! any news about that? I have a ban problem I i need a fix for that