mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 17:07:18 +08:00
YouTube: update new regex pattern to find JS player signature function name
This commit is contained in:
parent
2d4fe594c6
commit
6d7359775a
@ -1177,7 +1177,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
|
||||
def _parse_sig_js(self, jscode):
|
||||
funcname = self._search_regex(
|
||||
(r'(["\'])signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(',
|
||||
(r'(?P<sig>\w+)\s*=\s*function\((\w+)\){\s*\2=\s*\2\.split\(""\)\s*;',
|
||||
r'(["\'])signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(',
|
||||
r'\.sig\|\|(?P<sig>[a-zA-Z0-9$]+)\('),
|
||||
jscode, 'Initial JS player signature function name', group='sig')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user