13

When I run youtube-dl, I get the message below (it's very long). What is the problem and how do I fix this? It tells me to update youtube-dl but I am running it in terminal using the youtube-dl execution command - I don't think it is actually installed on my PC.

ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/snap/youtube-dl/4572/lib/python3.6/site-packages/youtube_dl/extractor/youtube.py", line 1361, in _decrypt_signature
    video_id, player_url, s
  File "/snap/youtube-dl/4572/lib/python3.6/site-packages/youtube_dl/extractor/youtube.py", line 1274, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/snap/youtube-dl/4572/lib/python3.6/site-packages/youtube_dl/extractor/youtube.py", line 1343, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/snap/youtube-dl/4572/lib/python3.6/site-packages/youtube_dl/jsinterp.py", line 245, in extract_function
    raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'na'; 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-dl with the --verbose flag and include its complete output.
 (caused by ExtractorError("Could not find JS function 'na'; 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-dl with the --verbose flag and include its complete output.",)); 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-dl with the --verbose flag and include its complete output.
Paul
  • 4,606
Allan
  • 661

4 Answers4

23

The youtube-dl project is unofficially dead. There have been no updates to the project since June, though was previously very active. There have been no published responses from the project maintainers, and the project was having serious issues on numerous websites starting several months ago.

Many people have migrated to yt-dlp, which has several install options, including PIP.

Paul
  • 4,606
6

Update:

Recommended solution is to use yt-dlp

Original response:

It's a known issue started a couple days ago, here is the github issue page:

https://github.com/ytdl-org/youtube-dl/issues/30363

The fix is there:

https://github.com/ytdl-org/youtube-dl/pull/30366/commits/1a091687c248b62c2f0a6070519bd78417828746

You're going to have to wait for the next release.

Or if you're in a rush and can't wait for the next release, you can go manually edit the "youtube.py" file in your installation.

In my install, the file was located at:

/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/youtube.py

I did the substitution manually, and I'm downloading again.

Wadih M.
  • 392
0

I just created a pull request to patch it. In a nutshell, youtube changed their two-char functions to three-char functions: it broke youtube-dl's regex stuff.

If you pull the project locally, then run this in terminal: python -m youtube_dl -x --audio-format mp3 https://youtu.be/lhXFIz0pVv4 it should download to the project folder.

Jedward
  • 11
-1

A 2025 Update

There doesnt seem to be any new releases of the https://github.com/ytdl-org/youtube-dl in the pypi servers since 17.12.2021

I used the most recent one on the nightly release package here https://github.com/ytdl-org/ytdl-nightly/releases/

via

python -m pip install "https://github.com/ytdl-org/ytdl-nightly/releases/download/2025.05.05/youtube-dl-2025.05.05.tar.gz"

Though my issue was due to the youtube-dl being at the very obsolete version of 17.12.2021.