Some instagram videos do not not download, even with login/auth

See original GitHub issue

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

  • I’m reporting a broken site
  • I’ve verified that I’m running yt-dlp version 2022.10.04 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

Germany

Provide a description that is worded well enough to be understood

Some Instagram videos that require a login are not downloading. So, I’m wondering if there is some issue with logging in (or using other means of authentication), and I suspect it may be due (at least, in part) to not getting valid “shared_data” from the previous request to login URL. I think perhaps there have been some changes to the content of the login page. But I see that verbose output indicates login succeeded (when maybe it actually didn’t??), so I’m pretty confused.

I did find one closed issue that was similar, but I was not sure if it was exactly the same issue or not. It seemed to be related to metadata extraction (or something like that), and it was closed with commit https://github.com/yt-dlp/yt-dlp/commit/2e7675489f4323c17c8de1e1fd264365c2c36e26. Also, I’m not sure if it resulted in complete failure. In this case, the issue results in complete failure, even when providing valid login/auth credentials with the yt-dlp command.

I hope at least some of this was intelligible. I tried to explain an issue that I don’t really understand.

I will also try to find at least one more video example that demonstrates this issue.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

root@vmi298562:/tmp/yt-dlp# python3.7 /usr/local/bin/yt-dlp -vU --write-pages -u username -p 'password' https://www.instagram.com/p/CjVGN-eqEfQ/
[debug] Command-line config: ['-vU', '--write-pages', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.instagram.com/p/CjVGN-eqEfQ/']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out UTF-8, error UTF-8, screen UTF-8
[debug] yt-dlp version 2022.10.04 [4e0511f27] API
[debug] Lazy loading extractors is disabled
[debug] Python 3.7.3 (CPython 64bit) - Linux-4.9.0-13-amd64-x86_64-with-debian-9.13 (glibc 2.17)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.2.2-static, ffprobe 4.2.2-static
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, websockets-9.1
[debug] Proxy map: {}
[debug] Loaded 1691 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[Instagram] Downloading login webpage
[Instagram] Saving request to None_https_-_www.instagram.com_accounts_login_.dump
[Instagram] Logging in
[Instagram] Saving request to None_https_-_www.instagram.com_accounts_login_ajax_.dump
[debug] [Instagram] Extracting URL: https://www.instagram.com/p/CjVGN-eqEfQ/
[Instagram] CjVGN-eqEfQ: Setting up session
[Instagram] Saving request to CjVGN-eqEfQ_https_-_i.instagram.com_api_v1_web_get_ruling_for_content_content_type=MEDIA_target_id=2942285280275089360.dump
[Instagram] CjVGN-eqEfQ: Downloading JSON metadata
WARNING: [Instagram] CjVGN-eqEfQ: General metadata extraction failed (some metadata might be missing).
[Instagram] CjVGN-eqEfQ: Downloading webpage
[Instagram] Saving request to CjVGN-eqEfQ_https_-_www.instagram.com_p_CjVGN-eqEfQ_.dump
WARNING: [Instagram] unable to extract shared data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
WARNING: [Instagram] Main webpage is locked behind the login page. Retrying with embed webpage (some metadata might be missing).
[Instagram] CjVGN-eqEfQ: Downloading embed webpage
[Instagram] Saving request to CjVGN-eqEfQ_https_-_www.instagram.com_p_CjVGN-eqEfQ_embed_.dump
WARNING: [Instagram] unable to extract additional data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
ERROR: [Instagram] CjVGN-eqEfQ: Requested content is not available, rate-limit reached or login required. Use --cookies, --cookies-from-browser, --username and --password, or --netrc (instagram) to provide account credentials
  File "/usr/local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 672, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.7/site-packages/yt_dlp/extractor/instagram.py", line 457, in _real_extract
    self.raise_login_required('Requested content is not available, rate-limit reached or login required')
  File "/usr/local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 1136, in raise_login_required
    raise ExtractorError(msg, expected=True)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
bashonlycommented, Oct 6, 2022

Is that only an instagram issue, or is it happening with all sites?

afaik only instagram. sorry, didn’t mean to imply otherwise. edited my original comment to clarify

1reaction
bashonlycommented, Oct 6, 2022

It looks like there’s a problem with the IG extractor logging in with credentials/netrc. There is no sessionid cookie being set after login, which causes yt-dlp to bypass the authenticated extraction flow.

You could try using --cookies-from-browser or --cookies instead of -u -p

Disclaimer: Using an IG account with yt-dlp is risky. IG employs various methods of detecting automated tool usage and if detected the account could be banned

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Instagram videos that won't play
Summary: If your Instagram videos are not playing or show loading error, here's a guide to fix all kinds of video problems in...
Read more >
Methods on How to Fix Instagram Videos Not Playing Issues
Frustrated with Instagram video cannot play? Try these solutions to help you out so you can enjoy watching videos on your Instagram feeds....
Read more >
How to Fix: Instagram Videos Won't Play on iPhone, Android, PC
Analyze Instagram video URL and choose an output option you like. Hit Download button to begin downloading Instagram video for offline playback.
Read more >
Troubleshooting - Instagram Help Center
Still no luck? Something might not be loading properly because of settings you or someone else set up. Try searching the Help Center...
Read more >
What to Do When Instagram Videos Are not Playing? - iMyFone
The following are some of the solutions you can try to fix the Instagram not playing videos issue and get them playing again....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found