create weboob.tools.browser.BrowserPasswordExpired
This commit is contained in:
parent
b2b2ff7b43
commit
5a046f00a8
6 changed files with 13 additions and 40 deletions
|
|
@ -22,10 +22,7 @@ from decimal import Decimal
|
|||
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.tools.browser import BasePage, BrokenPageError
|
||||
|
||||
from ..errors import PasswordExpired
|
||||
|
||||
from weboob.tools.browser import BasePage, BrokenPageError, BrowserPasswordExpired
|
||||
|
||||
__all__ = ['AccountsList']
|
||||
|
||||
|
|
@ -83,7 +80,7 @@ class AccountsList(BasePage):
|
|||
# of this password
|
||||
for img in self.document.getroot().cssselect('img[align="middle"]'):
|
||||
if img.attrib.get('alt', '') == 'Changez votre code secret':
|
||||
raise PasswordExpired('Your password has expired')
|
||||
raise BrowserPasswordExpired('Your password has expired')
|
||||
return l
|
||||
|
||||
def get_execution_id(self):
|
||||
|
|
|
|||
|
|
@ -20,10 +20,9 @@
|
|||
|
||||
import re
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.browser import BasePage, BrowserPasswordExpired
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
from weboob.capabilities.bank import TransferError
|
||||
from ..errors import PasswordExpired
|
||||
|
||||
|
||||
__all__ = ['TransferPage', 'TransferConfirmPage', 'TransferCompletePage']
|
||||
|
|
@ -40,7 +39,7 @@ class TransferPage(BasePage):
|
|||
def on_loaded(self):
|
||||
for td in self.document.xpath('//td[@class="hdvon1"]'):
|
||||
if td.text and 'Vous avez atteint le seuil de' in td.text:
|
||||
raise PasswordExpired(td.text.strip())
|
||||
raise BrowserPasswordExpired(td.text.strip())
|
||||
|
||||
def get_accounts(self):
|
||||
accounts = OrderedDict()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue