Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Unable to extract nsig function code (caused by RegexNotFoundError('Unable to extract mInitial JS player n function name) #32992

Closed
1 task
psydevascender opened this issue Dec 11, 2024 · 1 comment

Comments

@psydevascender
Copy link

youtube-dl % python3 ./youtube-dl --verbose "https://www.youtube.com/watch?v=FDXf1XxCXAk"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=FDXf1XxCXAk']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Single file build
[debug] Python 3.9.6 (CPython arm64 64bit) - macOS-15.1.1-arm64-arm-64bit - LibreSSL 2.8.3
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] FDXf1XxCXAk: Downloading webpage
[youtube] FDXf1XxCXAk: Downloading player 3bb1f723
WARNING: [youtube] Falling back to generic n function search
ERROR: Unable to extract nsig function code (caused by RegexNotFoundError('Unable to extract \x1b[0;34mInitial JS player n function name\x1b[0m; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.')); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
Traceback (most recent call last):
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1637, in _decrypt_nsig
jsi, player_id, func_code = self._extract_n_function_code(video_id, player_url)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1719, in _extract_n_function_code
func_name = self._extract_n_function_name(jscode)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1696, in _extract_n_function_name
return self._search_regex(
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/common.py", line 1101, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player n function name; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
Traceback (most recent call last):
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1637, in _decrypt_nsig
jsi, player_id, func_code = self._extract_n_function_code(video_id, player_url)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1719, in _extract_n_function_code
func_name = self._extract_n_function_name(jscode)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1696, in _extract_n_function_name
return self._search_regex(
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/common.py", line 1101, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player n function name; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/YoutubeDL.py", line 875, in wrapper
return func(self, *args, **kwargs)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/YoutubeDL.py", line 971, in __extract_info
ie_result = ie.extract(url)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/common.py", line 571, in extract
ie_result = self._real_extract(url)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 2137, in _real_extract
self._unthrottle_format_urls(video_id, player_url, dct)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1754, in _unthrottle_format_urls
n_response = decrypt_nsig(n_param)(n_param, video_id, player_url)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1614, in inner
raise ret
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1606, in inner
self._player_cache[cache_id] = func(*args, **kwargs)
File "/Users/ascender/ydl/youtube-dl/./youtube-dl/youtube_dl/extractor/youtube.py", line 1639, in _decrypt_nsig
raise ExtractorError('Unable to extract nsig function code', cause=e)
youtube_dl.utils.ExtractorError: Unable to extract nsig function code (caused by RegexNotFoundError('Unable to extract \x1b[0;34mInitial JS player n function name\x1b[0m; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.')); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.

  • I'm reporting a broken site support issue
  • [ x] I've verified that I'm running youtube-dl version 2021.12.17
  • [ 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
@dirkf
Copy link
Contributor

dirkf commented Dec 11, 2024

[ x] I've searched the bugtracker for similar bug reports including closed ones

Yet failed to see #32986. Also, be sure to review #30839, #32905.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants