]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Fix sigfunc name extraction (closes #26134, closes #26135, closes #26136...
authorSergey M․ <dstftw@gmail.com>
Mon, 27 Jul 2020 22:04:50 +0000 (05:04 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 27 Jul 2020 22:05:38 +0000 (05:05 +0700)
youtube_dl/extractor/youtube.py

index c27f2cd9523ebe7a7bb7bf2f4a38bd22b779051f..b35bf03aafc7c7c45b3c35735a68d00f86aed988 100644 (file)
@@ -1384,7 +1384,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
         funcname = self._search_regex(
             (r'\b[cs]\s*&&\s*[adf]\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
              r'\b[a-zA-Z0-9]+\s*&&\s*[a-zA-Z0-9]+\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
-             r'\b(?P<sig>[a-zA-Z0-9$]{2})\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
+             r'(?:\b|[^a-zA-Z0-9$])(?P<sig>[a-zA-Z0-9$]{2})\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
              r'(?P<sig>[a-zA-Z0-9$]+)\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
              # Obsolete patterns
              r'(["\'])signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(',