mirror of
https://github.com/l1ving/youtube-dl
synced 2026-06-08 22:33:34 +08:00
Fix _remove_comments regex because of function that has “/*” in it:
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 []
}
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user