Commit f01823af authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Vincent A

weboob.browser.pages: import json toplevel, it's cleaner

It's not an optional or costly dependency.
parent bf90e699
......@@ -33,8 +33,10 @@ import requests
from weboob.exceptions import ParseError, ModuleInstallError
from import basestring, unicode, urljoin
from import json, mini_jsonpath
from import getLogger
from import decompress_pdf
from .exceptions import LoggedOut
......@@ -468,12 +470,9 @@ class JsonPage(Page):
return default
def path(self, path, context=None):
from import mini_jsonpath
return mini_jsonpath(context or self.doc, path)
def build_doc(self, text):
from import json
bom = u'\uFEFF' # wtf
if text.startswith(bom):
text = text[len(bom):]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment