support several contracts (only select default one for now)

This commit is contained in:
Romain Bignon 2012-10-19 16:33:01 +02:00
commit 853afb52b2
2 changed files with 14 additions and 2 deletions

View file

@ -23,7 +23,7 @@ from urlparse import urlsplit, parse_qsl
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
from .pages import SkipPage, LoginPage, AccountsPage, AccountHistoryPage, \
CBListPage, CBHistoryPage
CBListPage, CBHistoryPage, ContractsPage
__all__ = ['LCLBrowser']
@ -39,6 +39,7 @@ class LCLBrowser(BaseBrowser):
PAGES = {
'https://particuliers.secure.lcl.fr/outil/UAUT/Authentication/authenticate': LoginPage,
'https://particuliers.secure.lcl.fr/outil/UAUT\?from=.*': LoginPage,
'https://particuliers.secure.lcl.fr/outil/UAUT/Contrat/choixContrat.*': ContractsPage,
'https://particuliers.secure.lcl.fr/outil/UWSP/Synthese': AccountsPage,
'https://particuliers.secure.lcl.fr/outil/UWLM/ListeMouvements.*/accesListeMouvements.*': AccountHistoryPage,
'https://particuliers.secure.lcl.fr/outil/UWCB/UWCBEncours.*/listeCBCompte.*': CBListPage,
@ -77,6 +78,7 @@ class LCLBrowser(BaseBrowser):
def get_accounts_list(self):
if not self.is_on_page(AccountsPage):
self.location('https://particuliers.secure.lcl.fr/outil/UWSP/Synthese')
return self.page.get_list()
def get_account(self, id):