From f3e5d9dcd3d6c0fba7a68d8897510956df7627c4 Mon Sep 17 00:00:00 2001 From: Shaya G Date: Tue, 17 Feb 2015 23:17:49 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20=5Fremove=5Fcomments=20regex=20because=20?= =?UTF-8?q?of=20function=20that=20has=20=E2=80=9C/*=E2=80=9D=20in=20it:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit function LB(a) { if ("undefined" != typeof a.selectNodes) { var b = Ad(a); "undefined" != typeof b.setProperty && b.setProperty("SelectionLanguage", "XPath"); return a.selectNodes('vmap:Extensions/vmap:Extension[@type = "YTBreakTime"]/*[name() = "yt:BreakTime"]') } if (document.implementation.hasFeature("XPath", "3.0")) { var b = Ad(a), c = b.createNSResolver(b.documentElement); a = b.evaluate('vmap:Extensions/vmap:Extension[@type = "YTBreakTime"]/*[name() = "yt:BreakTime"]', a, c, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var b = [], c = a.snapshotLength, d = 0; d < c; d++) b.push(a.snapshotItem(d)); return b } return [] } --- youtube_dl/jsinterp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 453e2732c..387f29d7e 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -35,7 +35,7 @@ class JSInterpreter(object): self._objects = objects def _remove_comments(self, code): - return re.sub(r'(?s)/\*.*?\*/', '', code) + return re.sub(r'(?s)/\*[^\[].*?\*/', '', code) def interpret_statement(self, stmt, local_vars, allow_recursion=100): if allow_recursion < 0: