youtube-dl: youtube_dl.utils.ExtractorError: Could not find JS function 'na'

I am running the latest version of “youtube-dl” A particular video gave me an error. Just below is the output from trying it with --verbose flag.

~/ytdl-verbose.sh https://www.youtube.com/watch?v=dsFpUW48Tnc
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-o', '~/Music/from-youtube/%(title)s.%(ext)s', '-f', 'best', 'https://www.youtube.com/watch?v=dsFpUW48Tnc']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.04.26
[debug] Python version 3.8.10 (CPython) - Linux-5.4.0-91-generic-x86_64-with-glibc2.29
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] dsFpUW48Tnc: Downloading webpage
[youtube] dsFpUW48Tnc: Downloading player f3c4e04d
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/usr/lib/python3/dist-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.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/usr/lib/python3/dist-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.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/usr/lib/python3/dist-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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 827, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1622, in _real_extract
    signature = self._decrypt_signature(sc['s'][0], video_id, player_url)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1358, in _decrypt_signature
    raise ExtractorError(
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1348, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1331, in _parse_sig_js
    initial_function = jsi.extract_function(funcname)
  File "/usr/lib/python3/dist-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.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 25 (1 by maintainers)

Most upvoted comments

Anyway, thanks to maintainers who have released the fix in less than 24 hours. 👏👏👏

Sure enough. I have not worked on OSS for years. The “youtube-dl” program’s instructions upon encountering the error said to report the bug here, there is no indication of a template etc.

deatrys

But I will tell you @s3n0 this:

As someone who has been working on OSS for years whose contributions are used in production by thousands (just check my repos), I find your attitude disgusting. Have some respect. You could have simply said the problem is fixed and PR raised, waiting for merge and release, instead of trolling.

Duplicate of #30363, with fix.

Duplicates. Before making a new issue report, take a little look at other recent titles. Besides 2021.04.26 is not the latest.

i just got the same error, also using most updated version. I successfully downloaded videos just a few days ago