Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
180
Issues
180
List
Boards
Labels
Milestones
Merge Requests
51
Merge Requests
51
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
f01823af
Commit
f01823af
authored
Sep 01, 2020
by
Vincent Ardisson
Committed by
Vincent A
Sep 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
weboob.browser.pages: import json toplevel, it's cleaner
It's not an optional or costly dependency.
parent
bf90e699
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
weboob/browser/pages.py
weboob/browser/pages.py
+2
-3
No files found.
weboob/browser/pages.py
View file @
f01823af
...
...
@@ -33,8 +33,10 @@ import requests
from
weboob.exceptions
import
ParseError
,
ModuleInstallError
from
weboob.tools.compat
import
basestring
,
unicode
,
urljoin
from
weboob.tools.json
import
json
,
mini_jsonpath
from
weboob.tools.log
import
getLogger
from
weboob.tools.pdf
import
decompress_pdf
from
.exceptions
import
LoggedOut
...
...
@@ -468,12 +470,9 @@ class JsonPage(Page):
return
default
def
path
(
self
,
path
,
context
=
None
):
from
weboob.tools.json
import
mini_jsonpath
return
mini_jsonpath
(
context
or
self
.
doc
,
path
)
def
build_doc
(
self
,
text
):
from
weboob.tools.json
import
json
bom
=
u'
\uFEFF
'
# wtf
if
text
.
startswith
(
bom
):
text
=
text
[
len
(
bom
):]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment