add a context argument
This commit is contained in:
parent
3835a0c19c
commit
511daa73a1
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue