summaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/jsinterp.py
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2015-12-18 18:57:49 +0600
committerSergey M․ <[email protected]>2015-12-18 18:57:49 +0600
commitb95779be21929c1aed1c0edbc3f9a5d11826973f (patch)
treecb29533aee030f29ec8e385cdacc6c1061300c92 /youtube_dl/jsinterp.py
parent10171468d94e68f92505a77938be11d266ccabd8 (diff)
downloadyoutube-dl-b95779be21929c1aed1c0edbc3f9a5d11826973f.tar.gz
youtube-dl-b95779be21929c1aed1c0edbc3f9a5d11826973f.zip
[jsinterp] Extend function regex (Closes #7900, closes #7901)
Diffstat (limited to 'youtube_dl/jsinterp.py')
-rw-r--r--youtube_dl/jsinterp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
index 2191e8b89..a7440c582 100644
--- 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*function|var\s+%s\s*=\s*function)\s*
\((?P<args>[^)]*)\)\s*
\{(?P<code>[^}]+)\}''' % (
re.escape(funcname), re.escape(funcname), re.escape(funcname)),