From 4054a2b623bd1e277b49d2e9abc3d112a4b1c7be Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Mon, 24 Mar 2025 16:22:25 -0500 Subject: [PATCH] [ie/youtube] Fix PhantomJS nsig fallback (#12728) Also fixes the NSigDeno plugin Closes #12724 Authored by: bashonly --- yt_dlp/extractor/youtube/_video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/youtube/_video.py b/yt_dlp/extractor/youtube/_video.py index ee93a599a..b8cc72ab1 100644 --- a/yt_dlp/extractor/youtube/_video.py +++ b/yt_dlp/extractor/youtube/_video.py @@ -2190,7 +2190,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): global_var, varname, _ = self._extract_player_js_global_var(full_code) if global_var: self.write_debug(f'Prepending n function code with global array variable "{varname}"') - code = global_var + ', ' + code + code = global_var + '; ' + code else: self.write_debug('No global array variable found in player JS') return argnames, re.sub( @@ -2199,7 +2199,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): def _extract_n_function_code(self, video_id, player_url): player_id = self._extract_player_info(player_url) - func_code = self.cache.load('youtube-nsig', player_id, min_ver='2025.03.21') + func_code = self.cache.load('youtube-nsig', player_id, min_ver='2025.03.24') jscode = func_code or self._load_player(video_id, player_url) jsi = JSInterpreter(jscode)