diff options
author | sepro <4618135+seproDev@users.noreply.github.com> | 2024-07-09 03:45:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 03:45:14 +0200 |
commit | 7ead7332af69422cee931aec3faa277288e9e212 (patch) | |
tree | 42b527a446a04dd1eb3b2c462a5c609e4cce8f6f | |
parent | 0b570f2a90ce2363ba06089217514d644e7be2e0 (diff) |
[ie/youtube] Remove broken `n` function extraction fallback (#10396)
Closes #10391
Authored by: pukkandan, seproDev
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
-rw-r--r-- | yt_dlp/extractor/youtube.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index bb043afab..1c0a70d35 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3151,17 +3151,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): func_name = self._extract_n_function_name(jscode) - # For redundancy - func_code = self._search_regex( - rf'''(?xs){func_name}\s*=\s*function\s*\((?P<var>[\w$]+)\)\s* - # NB: The end of the regex is intentionally kept strict - {{(?P<code>.+?}}\s*return\ [\w$]+.join\(""\))}};''', - jscode, 'nsig function', group=('var', 'code'), default=None) - if func_code: - func_code = ([func_code[0]], func_code[1]) - else: - self.write_debug('Extracting nsig function with jsinterp') - func_code = jsi.extract_function_code(func_name) + func_code = jsi.extract_function_code(func_name) self.cache.store('youtube-nsig', player_id, func_code) return jsi, player_id, func_code |