Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Instagram downloads are not working #25354
Comments
|
I get the same error with Instagram when running through a proxy. Works locally without proxy. Proxies I use are private and work for all other sites. |
|
we get the same error . |
|
It looks like Instagram is forcing a login, since a request to a video URL returns an HTTP response like this:
Bu you can still anonymously view a video in the browser, without logging in. So there must be a way to do this without a login. I've just not been able to reproduce this yet programmatically. There is some kind of encryption "public_key" in the login page source code (e.g., "ecf32677d2da3a328654f55f721d5ee7ef133c11ceb86685077eacc31716f93b"), and it looks like it is manipulated by https://www.instagram.com/static/bundles/es6/EncryptionUtils.js/8c78adc6dadb.js in some way. Maybe that public key could be used to bypass the login screen? Or maybe that just adds a layer of encryption to the login process. If anyone could contribute more to this issue, I think all of us would appreciate it. |
|
For anyone that's interested, I (programmatically) found a video's mp4 file in the source code of "embed" pages like https://www.instagram.com/p/8fAKWTSWa6/embed/ . The download link is in the JavaScript code that starts with "window.__additionalDataLoaded". I don't know python well enough to update this repo, but for someone who knows python, it should not be difficult to do. Hope it helps. |
|
here is the fix: https://github.com/ytdl-org/youtube-dl/pull/22880/files |
|
Edit: Completely unrelated to OP. Comment left for future searches.
Edit: I figured it was a private account, I have to create an instagram account, attempt to "subscribe" on the IGTV channel of that person, and they have to allow me to watch it. Then and only then I seem to get access to the video via cookie. |
|
For me error occurs only if i use vpn or vps |

Checklist
Verbose log
Description
It appears that the download URLs are no longer directly embedded in inline JS on video page. My guess is that they are now found in one of the many external JS scripts included in the page. If I find out which one and/or where, I will update this thread.
Thank you.