mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 06:57:21 +00:00
[ie/youtube] Fix n
function name extraction for player 3400486c
(#10542)
Authored by: bashonly
This commit is contained in:
parent
a3bab4752a
commit
713b4cd18f
|
@ -171,6 +171,10 @@
|
|||
'https://www.youtube.com/s/player/b22ef6e7/player_ias.vflset/en_US/base.js',
|
||||
'b6HcntHGkvBLk_FRf', 'kNPW6A7FyP2l8A',
|
||||
),
|
||||
(
|
||||
'https://www.youtube.com/s/player/3400486c/player_ias.vflset/en_US/base.js',
|
||||
'lL46g3XifCKUZn1Xfw', 'z767lhet6V2Skl',
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -3131,7 +3131,14 @@ def _decrypt_nsig(self, s, video_id, player_url):
|
|||
|
||||
def _extract_n_function_name(self, jscode):
|
||||
funcname, idx = self._search_regex(
|
||||
r'''(?x)(?:\.get\("n"\)\)&&\(b=|b=String\.fromCharCode\(110\),c=a\.get\(b\)\)&&\(c=)
|
||||
r'''(?x)
|
||||
(?:
|
||||
\.get\("n"\)\)&&\(b=|
|
||||
(?:
|
||||
b=String\.fromCharCode\(110\)|
|
||||
([a-zA-Z0-9$.]+)&&\(b="nn"\[\+\1\]
|
||||
),c=a\.get\(b\)\)&&\(c=
|
||||
)
|
||||
(?P<nfunc>[a-zA-Z0-9$]+)(?:\[(?P<idx>\d+)\])?\([a-zA-Z0-9]\)''',
|
||||
jscode, 'Initial JS player n function name', group=('nfunc', 'idx'))
|
||||
if not idx:
|
||||
|
|
Loading…
Reference in a new issue