Browse Source

[jsinterp] Extend function regex (Closes #7900, closes #7901)

master
Sergey M․ 9 years ago
parent
commit
b95779be21
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/jsinterp.py

2
youtube_dl/jsinterp.py

@ -232,7 +232,7 @@ class JSInterpreter(object):
def extract_function(self, funcname): def extract_function(self, funcname):
func_m = re.search( func_m = re.search(
r'''(?x) 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<args>[^)]*)\)\s*
\{(?P<code>[^}]+)\}''' % ( \{(?P<code>[^}]+)\}''' % (
re.escape(funcname), re.escape(funcname), re.escape(funcname)), re.escape(funcname), re.escape(funcname), re.escape(funcname)),

Loading…
Cancel
Save