diff --git a/modules/cmso/par/browser.py b/modules/cmso/par/browser.py index 83717f3d171d22e3a0d42d75f6d6c2d2d88a9dd3..87b6516b82e5c93caf370d86460b6e5644de7a53 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 43296a4e8c1b1ce34c7425b3e72ccd61dd079e79..939424abcc00caae82036002f544303804988ac4 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),