1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-09 11:05:13 +00:00

[ie/youtube] Fix signature and nsig extraction for player 4fcd6e4a (#12748)

Closes #12746
Authored by: seproDev
This commit is contained in:
sepro
2025-03-26 00:40:58 +01:00
committed by GitHub
parent 336b33e72f
commit a550dfc904
2 changed files with 11 additions and 1 deletions

View File

@@ -2182,6 +2182,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
(?P<value>
(?P<q2>["\'])(?:(?!(?P=q2)).|\\.)+(?P=q2)
\.split\((?P<q3>["\'])(?:(?!(?P=q3)).)+(?P=q3)\)
|\[\s*(?:(?P<q4>["\'])(?:(?!(?P=q4)).|\\.)*(?P=q4)\s*,?\s*)+\]
)
)[;,]
''', jscode, 'global variable', group=('code', 'name', 'value'), default=(None, None, None))
@@ -2199,7 +2200,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.25')
func_code = self.cache.load('youtube-nsig', player_id, min_ver='2025.03.26')
jscode = func_code or self._load_player(video_id, player_url)
jsi = JSInterpreter(jscode)