Apply suggestions from code review

This commit is contained in:
dirkf 2024-08-01 18:48:05 +01:00 committed by GitHub
parent d2ae1d08a1
commit 8765808cd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -175,8 +175,8 @@ _NSIG_TESTS = [
'7X-he4jjvMx7BCX', 'sViSydX8IHtdWA',
),
(
'https://www.youtube.com/s/player/20dfca59/player_ias.vflset/en_US/base.js',
'-fLCxedkAk4LUTK2', 'O8kfRq1y1eyHGw',
'https://www.youtube.com/s/player/20dfca59/player_ias.vflset/en_US/base.js',
'-fLCxedkAk4LUTK2', 'O8kfRq1y1eyHGw',
),
]

View File

@ -1676,7 +1676,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
\.\s*get\s*\(\s*(?(b)(?P=b)|"n{1,2}")(?:\s*\)){2}\s*
&&\s*\(\s*(?(c)(?P=c)|(?P=b))
)
)\s*=\s*
)\s*=\s*
(?P<nfunc>[a-zA-Z_$][\w$]*)(?:\s*\[(?P<idx>\d+)\])?\s*\(\s*[\w$]+\s*\)
''', jscode, 'Initial JS player n function name', group=('nfunc', 'idx'),
default=(None, None))