diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-11-16 20:43:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 20:43:19 +0800 |
commit | eceba9f805e395429d1850ff2a339728c9dfed7f (patch) | |
tree | 9525e38e865d08a4b7a2f9413361f8d6f4ee8c60 /youtube_dl/jsinterp.py | |
parent | 58355a3bf163349831b076c0fac4c09a286d5aa4 (diff) | |
parent | 95ad9ce573033006b08c4f1a440f3ff04c20d8b3 (diff) | |
download | youtube-dl-eceba9f805e395429d1850ff2a339728c9dfed7f.tar.gz youtube-dl-eceba9f805e395429d1850ff2a339728c9dfed7f.tar.bz2 youtube-dl-eceba9f805e395429d1850ff2a339728c9dfed7f.zip |
Merge pull request #11122 from kasper93/openload
[openload] Fix extraction.
Diffstat (limited to 'youtube_dl/jsinterp.py')
-rw-r--r-- | youtube_dl/jsinterp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 9737f7002..a8df4aef0 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -198,12 +198,12 @@ class JSInterpreter(object): return opfunc(x, y) m = re.match( - r'^(?P<func>%s)\((?P<args>[a-zA-Z0-9_$,]+)\)$' % _NAME_RE, expr) + r'^(?P<func>%s)\((?P<args>[a-zA-Z0-9_$,]*)\)$' % _NAME_RE, expr) if m: fname = m.group('func') argvals = tuple([ int(v) if v.isdigit() else local_vars[v] - for v in m.group('args').split(',')]) + for v in m.group('args').split(',')]) if len(m.group('args')) > 0 else tuple() if fname not in self._functions: self._functions[fname] = self.extract_function(fname) return self._functions[fname](argvals) |