yt-dlc: [YouTube] Unable to extract JS player URL

Checklist

  • [x ] I’m reporting a broken site support issue
  • [x ] I’ve verified that I’m running youtube-dlc version 2020.10.24
  • [x ] I’ve checked that all provided URLs are alive and playable in a browser
  • [x ] I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • [x ] I’ve searched the bugtracker for similar bug reports including closed ones
  • [x ] I’ve read bugs section in FAQ

Verbose log

[Download] Debug: [youtube] dX3k_QDnzHE: Downloading webpage
[Download] Debug: [youtube] dX3k_QDnzHE: Downloading embed webpage
[Download] Error: ERROR: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output.
[Download] Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/youtube_dlc/YoutubeDL.py", line 830, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dlc/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dlc/extractor/youtube.py", line 2050, in _real_extract
    ASSETS_RE, embed_webpage, 'JS player URL')
  File "/usr/local/lib/python3.6/dist-packages/youtube_dlc/extractor/common.py", line 1010, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dlc.utils.RegexNotFoundError: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dlc with the --verbose flag and include its complete output.

Description

This issue is happening around 2-3% of the time when downloading some Videos. This is one of the Videos (https://youtu.be/dX3k_QDnzHE), I am using yt-dlc in python embedded and not as a command line tool. I tried to make it as verbose as possible. If you need more info, just let me know.

As this issue is only happening sometimes, I know this is extremely hard to reproduce and fix, but maybe other people are experiencing this issue too and can share their experience with said issue.

If you need any more info, let me know

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Google must have broken the js protocol we were using because of the DMCA takedown and now we’re gonna have to completely redo the program. So rude 😠

Just wait for next release or build yourself.

running youtube-dl as administrator work well for me for all video hope it’ll help

With the last update, version 2020.11.01.1 it is working again. Many thanks to all contributors.

Is there any specific pattern to the release dates? Since this is already on the main branch installing via pip install git+https://github.com/blackjack4494/yt-dlc allows for it to work. But then any cron you have that runs pip install --upgrade youtube-dlc reverts it back to the broken version.

I’m using the last version (26.10.2020) and the issue is not resolved. I can provide logs too if it’s needed. Thanks.

After looking deeper, the download url is changing, which explains why it’s ~2% of the time. Occasionally the URL is embedded and hits this code: https://github.com/blackjack4494/yt-dlc/blob/c3a7565610c452511804c3aefb1d00a9af58bdbb/youtube_dlc/extractor/youtube.py#L2043-L2050 Which is where it’s failing. Using --dump-pages, I can see the actual URL of the video changes:

[youtube] dX3k_QDnzHE: Downloading webpage [youtube] Dumping request to https://www.youtube.com/watch?v=dX3k_QDnzHE&gl=US&hl=en&has_verified=1&bpctr=9999999999&disable_polymer=true

Vs:

[youtube] dX3k_QDnzHE: Downloading embed webpage [youtube] Dumping request to https://www.youtube.com/embed/dX3k_QDnzHE?disable_polymer=true

This could be an artifact of the way youtube/google are routing their calls to videos.