Commit 4993fd11 authored by Maxime Pommier's avatar Maxime Pommier Committed by ntome

[barclays] Handle website unavailable

parent 4fdfc944
......@@ -28,7 +28,7 @@ from weboob.browser.filters.html import Attr, TableCell, ReplaceEntities
from weboob.capabilities.bank import Account, Investment, Loan, NotAvailable
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.capabilities.bank.iban import is_iban_valid
from weboob.exceptions import ActionNeeded
from weboob.exceptions import ActionNeeded, BrowserUnavailable
def MyDecimal(*args, **kwargs):
......@@ -78,6 +78,13 @@ class LoginPage(HTMLPage):
def is_here(self):
return bool(CleanText('//div[@class="zone-authent"]')(self.doc))
def on_load(self):
message = CleanText("//div[contains(@class, 'bloc-message error')]//h3")(self.doc)
text = "Suite à une erreur technique, cette page ne peut pas s'afficher actuellement."
if text in message:
# For now, the message is too related to the bank website, we don't return it.
raise BrowserUnavailable()
def login(self, login, passwd):
form = self.get_form(id='form1')
......
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