From 1a928fac497de1faabe625ea905efc64a1cf7b06 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Sun, 14 Jul 2024 08:28:21 +0200 Subject: [PATCH] [youtube] fix extraction --- src/you_get/extractors/youtube.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/youtube.py b/src/you_get/extractors/youtube.py index e36124c859..f87ea31b22 100644 --- a/src/you_get/extractors/youtube.py +++ b/src/you_get/extractors/youtube.py @@ -80,7 +80,8 @@ def n_to_n(js, n): # Examples: # yma - https://www.youtube.com/s/player/84314bef/player_ias.vflset/en_US/base.js # Xka - https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/sv_SE/base.js - f1 = match1(js, r'a\.set\("n",b\),[$\w]+\.length\|\|([$\w]+)\(""\)') + # jma - https://www.youtube.com/s/player/8d9f6215/player_ias.vflset/sv_SE/base.js + f1 = match1(js, r',[$\w]+\.length\|\|([$\w]+)\(""\)\)}};') f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1)) n = dukpy.evaljs('(%s)("%s")' % (f1def, n)) return n