postaddictme / instagram-java-scraper

Instagram Java Scraper. Get account information, photos, videos and comments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Login is broken

mojtabaebadi opened this issue · comments

it looks instagram has changed their login endpoint.
I'm getting 400 BadRequest error.
it looks these guys have made a fix for their library
pgrimaud/instagram-user-feed#65

I have the same issue, please fix it finally!

我在自己的叉子上有一个修复 https://github.com/mojtabaebadi/instagram-java-scraper/pull/2/files

I tried your fixed version. No effect finally returned 400

--> POST https://www.instagram.com/accounts/login http/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 154
Referer: https://www.instagram.com/accounts/login/
X-CSRFToken: vhP8RusWnxV8GKQ887wFeBE6Q29lO7M0
User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
X-Instagram-AJAX: 1
X-Requested-With: XMLHttpRequest
X-IG-App-ID: 936619743392459
Host: www.instagram.com
Connection: Keep-Alive
Accept-Encoding: gzip
Cookie: ig_nrcb=1; csrftoken=vhP8RusWnxV8GKQ887wFeBE6Q29lO7M0; mid=Ye0h-AAEAAFCm5ui1Vcwci-1YmkJ; ig_did=8768D946-397F-42D6-954B-3FED23737E40

username=zilang&password=9e8QD7568ps9g&enc_password=%23PWD_INSTAGRAM_BROWSER%3A0%3A1642930681%3A8e8QDF5wVpsNpTh&queryParams=%7B%7D&optIntoOneTap=true
--> END POST (154-byte body)
<-- 400 Bad Request https://www.instagram.com/accounts/login (337ms)
Content-Type: text/html; charset=utf-8
Date: Sun, 23 Jan 2022 09:38:02 GMT
x-ig-origin-region: atn
X-FB-TRIP-ID: 1679558926
Alt-Svc: h3=":443"; ma=3600,h3-29=":443"; ma=3600
Connection: keep-alive
Content-Length: 11
OkHttp-Sent-Millis: 1642930681914
OkHttp-Received-Millis: 1642930682251

Bad request
<-- END HTTP (11-byte body)

我也遇到了同样的问题,终于解决了!

请教下如何解决给个思路被

Why do you send password again?
You have to send enc_password only