diff --git a/modules/cic/browser.py b/modules/cic/browser.py index edaf7e5a..c1a04526 100644 --- a/modules/cic/browser.py +++ b/modules/cic/browser.py @@ -25,7 +25,8 @@ from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword from weboob.capabilities.bank import Transfer, TransferError from .pages import LoginPage, LoginErrorPage, AccountsPage, UserSpacePage, EmptyPage, \ - OperationsPage, CardPage, NoOperationsPage, InfoPage, TransfertPage + OperationsPage, CardPage, NoOperationsPage, InfoPage, TransfertPage, \ + ChangePasswordPage __all__ = ['CICBrowser'] @@ -48,9 +49,11 @@ class CICBrowser(BaseBrowser): 'https://www.cic.fr/.*/fr/banque/CR/arrivee\.asp.*': NoOperationsPage, 'https://www.cic.fr/.*/fr/banque/BAD.*': InfoPage, 'https://www.cic.fr/.*/fr/banque/.*Vir.*': TransfertPage, + 'https://www.cic.fr/.*/fr/validation/change_password.cgi': ChangePasswordPage, 'https://www.cic.fr/.*/fr/': EmptyPage, + 'https://www.cic.fr/.*/fr/banques/index.html': EmptyPage, 'https://www.cic.fr/.*/fr/banque/paci_beware_of_phishing.html.*': EmptyPage, - 'https://www.cic.fr/.*/fr/validation/.*': EmptyPage, + 'https://www.cic.fr/.*/fr/validation/(?!change_password).*': EmptyPage, } currentSubBank = None diff --git a/modules/cic/pages.py b/modules/cic/pages.py index f35c431f..41053259 100644 --- a/modules/cic/pages.py +++ b/modules/cic/pages.py @@ -22,7 +22,7 @@ from urlparse import urlparse, parse_qs from decimal import Decimal import re -from weboob.tools.browser import BasePage +from weboob.tools.browser import BasePage, BrowserIncorrectPassword from weboob.tools.ordereddict import OrderedDict from weboob.capabilities.bank import Account from weboob.tools.capabilities.bank.transactions import FrenchTransaction @@ -37,6 +37,10 @@ class LoginPage(BasePage): class LoginErrorPage(BasePage): pass +class ChangePasswordPage(BasePage): + def on_loaded(self): + raise BrowserIncorrectPassword('Please change your password') + class InfoPage(BasePage): pass diff --git a/modules/creditmutuel/browser.py b/modules/creditmutuel/browser.py index 1d3290d0..3ea6e7fc 100644 --- a/modules/creditmutuel/browser.py +++ b/modules/creditmutuel/browser.py @@ -25,7 +25,8 @@ from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword from weboob.capabilities.bank import Transfer, TransferError from .pages import LoginPage, LoginErrorPage, AccountsPage, UserSpacePage, EmptyPage, \ - OperationsPage, CardPage, NoOperationsPage, InfoPage, TransfertPage + OperationsPage, CardPage, NoOperationsPage, InfoPage, TransfertPage, \ + ChangePasswordPage __all__ = ['CreditMutuelBrowser'] @@ -48,10 +49,11 @@ class CreditMutuelBrowser(BaseBrowser): 'https://www.creditmutuel.fr/.*/fr/banque/CR/arrivee\.asp.*': NoOperationsPage, 'https://www.creditmutuel.fr/.*/fr/banque/BAD.*': InfoPage, 'https://www.creditmutuel.fr/.*/fr/banque/.*Vir.*': TransfertPage, + 'https://www.creditmutuel.fr/.*/fr/validation/change_password.cgi': ChangePasswordPage, 'https://www.creditmutuel.fr/.*/fr/': EmptyPage, 'https://www.creditmutuel.fr/.*/fr/banques/index.html': EmptyPage, 'https://www.creditmutuel.fr/.*/fr/banque/paci_beware_of_phishing.html.*': EmptyPage, - 'https://www.creditmutuel.fr/.*/fr/validation/.*': EmptyPage, + 'https://www.creditmutuel.fr/.*/fr/validation/(?!change_password).*': EmptyPage, } currentSubBank = None diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 7fc3a87c..257fcf09 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -22,7 +22,7 @@ from urlparse import urlparse, parse_qs from decimal import Decimal import re -from weboob.tools.browser import BasePage +from weboob.tools.browser import BasePage, BrowserIncorrectPassword from weboob.tools.ordereddict import OrderedDict from weboob.capabilities.bank import Account from weboob.tools.capabilities.bank.transactions import FrenchTransaction @@ -37,6 +37,10 @@ class LoginPage(BasePage): class LoginErrorPage(BasePage): pass +class ChangePasswordPage(BasePage): + def on_loaded(self): + raise BrowserIncorrectPassword('Please change your password') + class InfoPage(BasePage): pass