projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0437307
)
[jsinterp] Relax JS function regex (Closes #9863)
author
Sergey M․
<dstftw@gmail.com>
Thu, 23 Jun 2016 02:41:34 +0000
(09:41 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 23 Jun 2016 02:41:34 +0000
(09:41 +0700)
youtube_dl/jsinterp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/jsinterp.py
b/youtube_dl/jsinterp.py
index a7440c58242079ea1c6874e1bed0abe756fdc814..9737f70021d3285a4e8df616467b764de1a91fa2 100644
(file)
--- a/
youtube_dl/jsinterp.py
+++ b/
youtube_dl/jsinterp.py
@@
-232,7
+232,7
@@
class JSInterpreter(object):
def extract_function(self, funcname):
func_m = re.search(
r'''(?x)
- (?:function\s+%s|[{;,]%s\s*=\s*function|var\s+%s\s*=\s*function)\s*
+ (?:function\s+%s|[{;,]
\s*
%s\s*=\s*function|var\s+%s\s*=\s*function)\s*
\((?P<args>[^)]*)\)\s*
\{(?P<code>[^}]+)\}''' % (
re.escape(funcname), re.escape(funcname), re.escape(funcname)),