Open arunkumaraqm opened 2 years ago
The direct link to post doesn't work in browser too (without login). Likely needs a Referer set
The hydration JSON that the extractor parses has changed, and the video URL isn't obviously in the page fetched by yt-dl. Same issue for yt-dlp.
Adding cookies or ?utm_source=ig_embed did not work for me. The only way to download video was to open the post in browser, opening dev console -> network -> "media" tab. There was a link like https://scontent-ams2-1.cdninstagram.com/v/t50..._n.mp4?... that worked for youtube-dl
Adding cookies or ?utm_source=ig_embed did not work for me. The only way to download video was to open the post in browser, opening dev console -> network -> "media" tab. There was a link like https://scontent-ams2-1.cdninstagram.com/v/t50..._n.mp4?... that worked for youtube-dl
What worked for me is copy the curl request and add the output to file flag in a terminal.
Been working with instagram recently and I've discovered the following after also reading through #26377
Clicking the link in my browser normally shows the video and all perfectly fine without redirect. But as soon as I opened it in selenium, it worked once and then from then-on, my device could not load the page without being redirected to the login page no matter what URL arguments I put in, no matter which browser, both with and without selenium.
I have tried using the CDN links that @LevYas mentioned and although they do work, they only appear in the network tab after you click play on the video.
If I find anything else that might be useful I'll post it here
- Clicking the link in my browser normally shows the video and all perfectly fine without redirect. But as soon as I opened it in selenium, it worked once and then from then-on, my device could not load the page without being redirected to the login page no matter what URL arguments I put in, no matter which browser, both with and without selenium.
Don't quote me on this but I think that Instagram limits the number of daily visits users can make without logging in (probably based on IP), which may be interfering with your experiments. (This might also explain the disagreement on whether links work or not.)
Hopefully this won't make debugging this issue too complicated...
Checklist
Verbose log
Description
Since one or two weeks, youtube-dl is not working for Instagram videos. Perhaps, this is due to some change in Instagram's source code. However, online websites like igram.io are still working.