[youtube] Fix n-sig extraction for phone player JS (#2816)
Authored by: MinePlayersPE
This commit is contained in:
parent
5b804e3906
commit
c571b3a6ab
2 changed files with 5 additions and 1 deletions
|
|
@ -2413,7 +2413,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||
|
||||
def _extract_n_function_name(self, jscode):
|
||||
nfunc, idx = self._search_regex(
|
||||
r'\.get\("n"\)\)&&\(b=(?P<nfunc>[a-zA-Z0-9$]{3})(?:\[(?P<idx>\d+)\])?\([a-zA-Z0-9]\)',
|
||||
r'\.get\("n"\)\)&&\(b=(?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:
|
||||
return nfunc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue