Exemple #1
0
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"
Exemple #2
0
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"
Exemple #3
0
 def __init__(self):
     self.parser = HtmlParser()
Exemple #4
0
	def __init__(self):
		self.parser = HtmlParser()