1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

[utils] Allow JSONP with empty func name (closes #17028)

This commit is contained in:
Sergey M․
2018-07-21 12:30:18 +07:00
parent fd62b36680
commit e9c671d5e8
2 changed files with 5 additions and 1 deletions

View File

@ -2282,7 +2282,7 @@ def parse_age_limit(s):
def strip_jsonp(code):
return re.sub(
r'''(?sx)^
(?:window\.)?(?P<func_name>[a-zA-Z0-9_.$]+)
(?:window\.)?(?P<func_name>[a-zA-Z0-9_.$]*)
(?:\s*&&\s*(?P=func_name))?
\s*\(\s*(?P<callback_data>.*)\);?
\s*?(?://[^\n]*)*$''',