add a context argument

This commit is contained in:
smurail 2015-05-06 15:30:15 +02:00 committed by Romain Bignon
commit 511daa73a1

View file

@ -420,9 +420,9 @@ class JsonPage(Page):
break
return node
def path(self, path):
def path(self, path, context=None):
from weboob.tools.json import mini_jsonpath
return mini_jsonpath(self.doc, path)
return mini_jsonpath(context or self.doc, path)
def build_doc(self, text):
from weboob.tools.json import json