mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 01:05:06 +00:00
[ie/youtube] Remove broken n
function extraction fallback (#10396)
Closes #10391 Authored by: pukkandan, seproDev Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
This commit is contained in:
parent
0b570f2a90
commit
7ead7332af
1 changed files with 1 additions and 11 deletions
|
@ -3151,16 +3151,6 @@ def _extract_n_function_code(self, video_id, player_url):
|
||||||
|
|
||||||
func_name = self._extract_n_function_name(jscode)
|
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)
|
self.cache.store('youtube-nsig', player_id, func_code)
|
||||||
|
|
Loading…
Reference in a new issue