From 5309faa44f149e7c3b0e2eebf70f9db5da04c674 Mon Sep 17 00:00:00 2001 From: Sylvie Ye Date: Mon, 20 May 2019 12:37:39 +0200 Subject: [PATCH] [cmb] accounts info page is not needed anymore --- modules/cmso/par/browser.py | 6 ++---- modules/cmso/par/pages.py | 9 --------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/modules/cmso/par/browser.py b/modules/cmso/par/browser.py index 83717f3d17..87b6516b82 100644 --- a/modules/cmso/par/browser.py +++ b/modules/cmso/par/browser.py @@ -33,7 +33,7 @@ from weboob.tools.capabilities.bank.transactions import sorted_transactions from .pages import ( - LogoutPage, InfosPage, AccountsPage, HistoryPage, LifeinsurancePage, MarketPage, + LogoutPage, AccountsPage, HistoryPage, LifeinsurancePage, MarketPage, AdvisorPage, LoginPage, ProfilePage, ) from .transfer_pages import TransferInfoPage, RecipientsListPage, TransferPage @@ -84,7 +84,6 @@ class CmsoParBrowser(LoginBrowser, StatesMixin): logout = URL('/securityapi/revoke', '/auth/errorauthn', '/\/auth/errorauthn', LogoutPage) - infos = URL('/comptes/', InfosPage) accounts = URL('/domiapi/oauth/json/accounts/synthese(?P.*)', AccountsPage) history = URL('/domiapi/oauth/json/accounts/(?P.*)', HistoryPage) loans = URL('/creditapi/rest/oauth/v1/synthese', AccountsPage) @@ -171,8 +170,7 @@ def iter_accounts(self): accounts_eligibilite_debit = self.page.get_eligibilite_debit() # First get all checking accounts... - data = dict(self.infos.stay_or_go().get_typelist()) - self.accounts.go(data=json.dumps(data), type='comptes', headers=self.json_headers) + self.accounts.go(json={'typeListeCompte': 'COMPTE_SOLDE_COMPTES_CHEQUES'}, type='comptes') self.page.check_response() for key in self.page.get_keys(): for a in self.page.iter_accounts(key=key): diff --git a/modules/cmso/par/pages.py b/modules/cmso/par/pages.py index 43296a4e8c..939424abcc 100644 --- a/modules/cmso/par/pages.py +++ b/modules/cmso/par/pages.py @@ -55,15 +55,6 @@ class LogoutPage(RawPage): pass -class InfosPage(LoggedPage, HTMLPage): - def get_typelist(self): - url = Attr(None, 'src').filter(self.doc.xpath('//script[contains(@src, "comptes/scripts")]')) - m = re.findall(r'synthesecomptes[^\w]+([^:]+)[^\w]+([^"]+)', self.browser.open(url).text) - for data in m: - if data[0] != 'method': - return {data[0]: data[1]} - - class AccountsPage(LoggedPage, JsonPage): TYPES = OrderedDict([('courant', Account.TYPE_CHECKING), ('pee', Account.TYPE_PEE), -- GitLab