From 74fbf865f2d80304ec7e51a62d7eac82f67b1fc3 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 1 Apr 2013 16:31:40 +0200 Subject: [PATCH] suports new page which asks for a code from a card --- modules/cic/browser.py | 5 +++-- modules/cic/pages.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/cic/browser.py b/modules/cic/browser.py index f04b291c..822ec0aa 100644 --- a/modules/cic/browser.py +++ b/modules/cic/browser.py @@ -26,7 +26,7 @@ from weboob.capabilities.bank import Transfer, TransferError from .pages import LoginPage, LoginErrorPage, AccountsPage, UserSpacePage, EmptyPage, \ OperationsPage, CardPage, NoOperationsPage, InfoPage, TransfertPage, \ - ChangePasswordPage + ChangePasswordPage, VerifCodePage __all__ = ['CICBrowser'] @@ -50,10 +50,11 @@ class CICBrowser(BaseBrowser): '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/validation/verif_code.cgi.*': VerifCodePage, '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/(?!change_password).*': EmptyPage, + 'https://www.cic.fr/.*/fr/validation/(?!change_password|verif_code).*': EmptyPage, } currentSubBank = None diff --git a/modules/cic/pages.py b/modules/cic/pages.py index 54bf887e..2ca446f1 100644 --- a/modules/cic/pages.py +++ b/modules/cic/pages.py @@ -45,6 +45,9 @@ class ChangePasswordPage(BasePage): def on_loaded(self): raise BrowserIncorrectPassword('Please change your password') +class VerifCodePage(BasePage): + def on_loaded(self): + raise BrowserIncorrectPassword('Unable to login: website asks a code from a card') class InfoPage(BasePage): pass