X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fjsinterp.py;h=b4617fbad0fc40323a129ce1218f9f97590c89bb;hb=d4f64cabf4ede444b390bb71b90ad4103ce572c0;hp=7f00586ae3217cfaa1b2912316736904eddeb964;hpb=16f8e9df8a414a182ddd5870a4c98a4725e911cf;p=youtube-dl diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 7f00586ae..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-zA-Z0-9_]+)\.(?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)