X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fjsinterp.py;h=b4617fbad0fc40323a129ce1218f9f97590c89bb;hb=60e5428925f7299182b4b327b3e88908e33eca1c;hp=5731e264baa06d276373d6bf7290e9b1df47ef68;hpb=892e3192fbed45c0fa13c91c3c18e432b95a4018;p=youtube-dl diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 5731e264b..b4617fbad 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -61,7 +61,7 @@ class JSInterpreter(object): pass m = re.match( - r'^(?P[a-z]+)\.(?P[^(]+)(?:\(+(?P[^()]*)\))?$', + r'^(?P[$a-zA-Z0-9_]+)\.(?P[^(]+)(?:\(+(?P[^()]*)\))?$', expr) if m: variable = m.group('var') @@ -108,7 +108,7 @@ class JSInterpreter(object): index, howMany = argvals res = [] for i in range(index, min(index + howMany, len(obj))): - res.append(obj.pop(i)) + res.append(obj.pop(index)) return res return obj[member](argvals)