-
-
Notifications
You must be signed in to change notification settings - Fork 996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[instagram][proxy/tor/vpn] 400 Bad Request after login try (but work in chromium with same proxy) #2480
Comments
Try to use all headers which the browser adds. Not only In particular |
You need to specify that in the proxy URL:
You can export and use your browser cookies with gallery-dl:
|
Not only, they are send to any https page independently is it (and localhost) |
I've had the same problem: gallery-dl could log-in but the API returned a 400 Bad Request for every link. I had to login via browser and provide my birthdate that Instagram requires for personalization now. It works again now. Use a throwaway account, provide false information. |
gallery-dl --proxy "127.0.0.1:8118" --get-url https://www.instagram.com/p/CaKUCI2gbJw/ -v
[gallery-dl][debug] Version 1.21.0
[gallery-dl][debug] Python 3.9.7 - Linux-5.16.12-051612-generic-x86_64-with-glibc2.34
[gallery-dl][debug] requests 2.25.1 - urllib3 1.26.5
[gallery-dl][debug] Starting UrlJob for 'https://www.instagram.com/p/CaKUCI2gbJw/'
[instagram][debug] Using InstagramPostExtractor for 'https://www.instagram.com/p/CaKUCI2gbJw/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /graphql/query/?query_hash=2efa04f61586458cef44441f474eee7c&variables=%7B%22shortcode%22%3A+%22CaKUCI2gbJw%22%2C+%22child_comment_count%22%3A+3%2C+%22fetch_comment_count%22%3A+40%2C+%22parent_comment_count%22%3A+24%2C+%22has_threaded_comments%22%3A+true%7D HTTP/1.1" 302 0
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /accounts/login/?next=/graphql/query/ HTTP/1.1" 200 28050
[instagram][error] HTTP redirect to login page (https://www.instagram.com/accounts/login/?next=/graphql/query/)
gallery-dl -u user -p password --proxy "127.0.0.1:8118" --get-url https://www.instagram.com/p/CaKUCI2gbJw/ -v
[gallery-dl][debug] Version 1.21.0
[gallery-dl][debug] Python 3.9.7 - Linux-5.16.12-051612-generic-x86_64-with-glibc2.34
[gallery-dl][debug] requests 2.25.1 - urllib3 1.26.5
[gallery-dl][debug] Starting UrlJob for 'https://www.instagram.com/p/CaKUCI2gbJw/'
[instagram][debug] Using InstagramPostExtractor for 'https://www.instagram.com/p/CaKUCI2gbJw/'
[instagram][info] Logging in as user
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /accounts/login/ HTTP/1.1" 200 28033
[instagram][debug] Sleeping for 11.11 seconds
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /data/shared_data/ HTTP/1.1" 200 16455
[instagram][debug] Sleeping for 6.451 seconds
[urllib3.connectionpool][debug] https://www.instagram.com:443 "POST /accounts/login/ajax/ HTTP/1.1" 400 273
[instagram][error] HttpError: '400 Bad Request' for 'https://www.instagram.com/accounts/login/ajax/'
but in chromium with same tor's proxy (socks5) it success login and show post
maybe i need use some data from chromium like cookies or useragent?
ps: http-proxy create from socks5 by privoxy
The text was updated successfully, but these errors were encountered: