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
182
Issues
182
List
Boards
Labels
Milestones
Merge Requests
53
Merge Requests
53
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
96133d1f
Commit
96133d1f
authored
Aug 19, 2016
by
Edouard Lambert
Committed by
Romain Bignon
Jan 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing spirica : handle maintenance page
parent
42c6ce2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
modules/spirica/browser.py
modules/spirica/browser.py
+2
-1
modules/spirica/pages.py
modules/spirica/pages.py
+6
-0
No files found.
modules/spirica/browser.py
View file @
96133d1f
...
...
@@ -21,7 +21,7 @@
from
weboob.browser
import
LoginBrowser
,
URL
,
need_login
from
weboob.exceptions
import
BrowserIncorrectPassword
from
.pages
import
LoginPage
,
AccountsPage
,
DetailsPage
from
.pages
import
LoginPage
,
AccountsPage
,
DetailsPage
,
MaintenancePage
class
SpiricaBrowser
(
LoginBrowser
):
...
...
@@ -29,6 +29,7 @@ class SpiricaBrowser(LoginBrowser):
login
=
URL
(
'/securite/login.xhtml'
,
LoginPage
)
accounts
=
URL
(
'/sylvea/client/synthese.xhtml'
,
AccountsPage
)
details
=
URL
(
'/sylvea/contrat/consultationContratEpargne.xhtml'
,
DetailsPage
)
maintenance
=
URL
(
'/maintenance.html'
,
MaintenancePage
)
def
__init__
(
self
,
website
,
username
,
password
,
*
args
,
**
kwargs
):
super
(
LoginBrowser
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
...
modules/spirica/pages.py
View file @
96133d1f
...
...
@@ -26,6 +26,7 @@
from
weboob.browser.filters.html
import
Attr
,
Link
from
weboob.capabilities.bank
import
Account
,
Investment
,
Transaction
from
weboob.capabilities.base
import
NotAvailable
from
weboob.exceptions
import
BrowserUnavailable
def
MyDecimal
(
*
args
,
**
kwargs
):
...
...
@@ -33,6 +34,11 @@ def MyDecimal(*args, **kwargs):
return
CleanDecimal
(
*
args
,
**
kwargs
)
class
MaintenancePage
(
HTMLPage
):
def
on_load
(
self
):
raise
BrowserUnavailable
(
CleanText
()
.
filter
(
self
.
doc
.
xpath
(
'//p'
)))
class
LoginPage
(
HTMLPage
):
def
login
(
self
,
login
,
password
):
form
=
self
.
get_form
(
'//form[@id="loginForm"]'
)
...
...
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