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 . Make sure you are using the latest version; see 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 . Make sure you are using the latest version; see on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)); please report this issue on . Make sure you are using the latest version; see on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. 9 3 Answers
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.
It's a known issue started a couple days ago, here is the github issue page:
The fix is there:
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.pyI did the substitution manually, and I'm downloading again.
5I 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 it should download to the project folder.