class Model_Pylogic_V8: def __init__(self): self.parser = HtmlParser() def fetch(self, url, script="function(doc, wnd){}"): _script = "exports = require('object.h').stringify((" + script + ")(document, window));" r = self.parser.parse(url, script=_script) if (r): r = json.loads(r) return r def test(self): return "test"
class Model_Pylogic_V8: def __init__(self): self.parser = HtmlParser() def fetch(self, url, script="function(doc, wnd){}"): _script = "exports = require('object.h').stringify((" + script + ")(document, window));" r = self.parser.parse(url, script=_script) if(r): r = json.loads(r) return r def test(self): return "test"
def __init__(self): self.parser = HtmlParser()