Open dsdenes opened 2 years ago
Ah damn. It's the challenge solver isn't working like I hoped it had. I see you are using a proxy. Could you locally edit these lines, to point to a request interceptor proxy (I use Burpsuite), and check the UserAgent used by chrome to make the requests (by running your code again, so that the checkpoint request is made again)? https://github.com/Davincible/goinsta/blob/60a454938098516a3379d5455de091ebc8575d3d/headless.go#L181-L182
The reason it currently does not work is it says "Accept cookies on this browser", indicating Insta thinks the request is coming from a browser instead of a phone. It should only say something like "Accept cookies", without the browser part.
For me it appeared fine after I changed the user agent to the Webkit one, as should the current code do.
I'm also getting a similar issue when I'm trying to like a post and the program encounters a challenge. The program opens a headfull chromium browser to https://i.instagram.com/challenge/
and just sits there showing a blank page.
@maxyoumj0 Is the page completely blank? It should just open up and sit there, as challenges are meant to be resolved manually, however that does require them to show up properly of course :)
@Davincible The page is completely blank so I can't manually solve the challenges.
@maxyoumj0 if you manage to open up the page again, could you open up dev tools and check the user-agent?
Alternatively you could use http-tools to man in the middle proxy the requests with the HTTP_PROXY
env variable
Edit: To enable proxies, see https://github.com/Davincible/goinsta/wiki/10.-Settings-&-Logging#proxies
The user agent is "Mozilla/5.0 (Linux; Android 11; SM-G975F/exynos9820; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/95.0.4638.50 Mobile Safari/537.36 Instagram 195.0.0.31.123 Android (30/11; 560dpi; 1440x2898; samsung; SM-G975F; beyond2; exynos9820; en_US; 302733750)". I'll try the alternative method u suggested.
Hmm that should be the correct user agent. Debugging these kinds of issues is quite hard as I can't get IG to constantly challenges at me to try it out. It worked the few times I encountered challenges.
Next thing to check would be if all appropriate headers are set
Dear @Davincible,
I tried to run the code
stdout
Content of https://i.instagram.com/privacy/checks/?cookie_consent=1&next=instagram://checkpoint/dismiss