aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2025-03-26 02:27:25 +0000
committerdirkf <fieldhouse@gmx.net>2025-03-26 02:27:25 +0000
commit2b4fbfce25902d557b86b003cf48f738129efce4 (patch)
tree1a584014a2e6c30ca0110634484cc349df06de78 /youtube_dl/extractor/youtube.py
parent1bc45b8b6c0c853e0f3d74346551fec0708c733d (diff)
[YouTube] Support player `4fcd6e4a`
thx seproDev, bashonly: yt-dlp/yt-dlp#12748
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 5addfe7c6..ce97fd75b 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1711,8 +1711,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
def _extract_sig_fn(self, jsi, funcname):
var_ay = self._search_regex(
- r'''(?:\*/|\{|\n|^)\s*(?:'[^']+'\s*;\s*)(var\s*[\w$]+\s*=\s*('|")(?:\\\2|(?!\2).)+\2\s*\.\s*split\(('|")\W+\3\))(?=\s*[,;])''',
- jsi.code, 'useful values', default='')
+ r'''(?x)
+ (?:\*/|\{|\n|^)\s*(?:'[^']+'\s*;\s*)
+ (var\s*[\w$]+\s*=\s*(?:
+ ('|")(?:\\\2|(?!\2).)+\2\s*\.\s*split\(\s*('|")\W+\3\s*\)|
+ \[\s*(?:('|")(?:\\\4|(?!\4).)*\4\s*(?:(?=\])|,\s*))+\]
+ ))(?=\s*[,;])
+ ''', jsi.code, 'useful values', default='')
sig_fn = jsi.extract_function_code(funcname)