projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[utils] Allow JSONP with empty func name (closes #17028)
[youtube-dl]
/
youtube_dl
/
utils.py
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 8c45166d76cd1d9150e67ba26f80ce61cb8c275c..b8700efcbd6860c74e5a96b5ed7790aaa26fbd94 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-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]*)*$''',