Commit db1ce527 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[lbp] handle website unavailable message for pro accounts

parent 2143afe6
......@@ -28,6 +28,7 @@ from weboob.capabilities.bank import Account
from weboob.capabilities.profile import Company
from weboob.capabilities.base import NotAvailable
from weboob.tools.compat import urljoin, unicode
from weboob.exceptions import BrowserUnavailable
from .accounthistory import Transaction
from .base import MyHTMLPage
......@@ -39,6 +40,10 @@ class RedirectPage(LoggedPage, MyHTMLPage):
class ProAccountsList(LoggedPage, MyHTMLPage):
def on_load(self):
if self.doc.xpath('//div[@id="erreur_generale"]'):
raise BrowserUnavailable(CleanText(u'//div[@id="erreur_generale"]//p[contains(text(), "Le service est momentanément indisponible")]')(self.doc))
ACCOUNT_TYPES = {u'comptes titres': Account.TYPE_MARKET,
u'comptes épargne': Account.TYPE_SAVINGS,
# wtf? ^
......
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