LCL: fix login

Signed-off-by: Pierre Mazière <pierre.maziere@gmail.com>
Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
Pierre Mazière 2011-03-06 23:47:52 +01:00 committed by Romain Bignon
commit 360a2ce3b5
2 changed files with 8 additions and 1 deletions

View file

@ -18,7 +18,7 @@
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
from .pages import LoginPage, LoginErrorPage, AccountsPage
from .pages import LoginPage, LoginErrorPage, FramePage, AccountsPage
__all__ = ['LCLBrowser']
@ -34,6 +34,7 @@ class LCLBrowser(BaseBrowser):
'https://particuliers.secure.lcl.fr/index.html': LoginPage,
'https://particuliers.secure.lcl.fr/everest/UWBI/UWBIAccueil\?DEST=IDENTIFICATION': LoginErrorPage,
'https://particuliers.secure.lcl.fr/outil/UWSP/Synthese/accesSynthese': AccountsPage,
'https://particuliers.secure.lcl.fr/outil/UWB2/Accueil\?DEST=INIT': FramePage,
}
def __init__(self, agency, *args, **kwargs):
@ -55,6 +56,8 @@ class LCLBrowser(BaseBrowser):
if not self.is_logged() or self.is_on_page(LoginErrorPage):
raise BrowserIncorrectPassword()
self.location('%s://%s/outil/UWSP/Synthese/accesSynthese' % (self.PROTOCOL, self.DOMAIN))
def get_accounts_list(self):
if not self.is_on_page(AccountsPage):
self.home()

View file

@ -29,6 +29,10 @@ class LoginPage(BasePage):
class LoginErrorPage(BasePage):
pass
class FramePage(BasePage):
pass
class AccountsPage(BasePage):
def get_list(self):
raise NotImplementedError()