detect when website is unavailable
This commit is contained in:
parent
34aff683eb
commit
c76cd0c1c5
1 changed files with 5 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ import re
|
|||
|
||||
from weboob.capabilities.bank import Account, Currency
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.browser import BasePage, BrowserUnavailable
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
|
||||
|
||||
|
|
@ -37,6 +37,10 @@ class AccountsList(BasePage):
|
|||
def get_list(self):
|
||||
ids = set()
|
||||
for tr in self.document.xpath('//tr[@align="center"]'):
|
||||
error = tr.xpath('./td/font/b')
|
||||
if len(error) > 0 and error[0].text == 'ERREUR':
|
||||
raise BrowserUnavailable()
|
||||
|
||||
account = Account()
|
||||
account.currency = Currency.CUR_EUR
|
||||
link = tr.xpath('.//a')[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue