handling when website have an error
This commit is contained in:
parent
fb8be410f4
commit
1122cbe977
1 changed files with 3 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ from decimal import Decimal
|
|||
|
||||
from weboob.capabilities.bank import Account, AccountNotFound
|
||||
from weboob.deprecated.browser import Page
|
||||
from weboob.exceptions import BrowserUnavailable
|
||||
from weboob.tools.misc import to_unicode
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
|
|
@ -29,6 +30,8 @@ from weboob.tools.ordereddict import OrderedDict
|
|||
|
||||
class AccountList(Page):
|
||||
def on_loaded(self):
|
||||
if self.document.xpath(u'//h2[text()="%s"]' % u'ERREUR'):
|
||||
raise BrowserUnavailable()
|
||||
self.accounts = OrderedDict()
|
||||
self.parse_table('comptes', Account.TYPE_CHECKING)
|
||||
self.parse_table('comptesEpargne', Account.TYPE_SAVINGS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue