PS C:\Users\Administrator\PycharmProjects\hello\bot> & C:/Users/Administrator/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Administrator/PycharmProjects/pythonProject/hutao/hutao_command.py
We have logged in as hutao#5005 ERROR: Signature extraction failed: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\extractor\youtube.py", line 1348, in _decrypt_signature func = self._extract_signature_function( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function res = self._parse_sig_js(code) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\extractor\youtube.py", line 1331, in _parse_sig_js initial_function = jsi.extract_function(funcname) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\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' (caused by ExtractorError("Could not find JS function 'na'"))
Same error try using yt-dlp instead. The usage is same just import the modules you imported from youtube-dl. SHORTCUT: replace youtube_dl where ever you see it in your code by yt-dlp. But first install it.
I was having this exact same problem on version 2021.6.6 which I was using but decided to upgrade using this command:
pip install --upgrade youtube-dl
It downloaded version 2021.12.17 which seems to work fine, I can download videos as usual now.