From e9fb17ef6863c0ce4381f9a9f50d711e1d49dca8 Mon Sep 17 00:00:00 2001 From: Quentin Defenouillere Date: Mon, 4 Feb 2019 15:27:50 +0100 Subject: [PATCH] [cragr] Included "/agriculteur" in the list of URLs Some connections crashed because the space has "/agriculteur" in the URL so I added it to all possible URLs following login. Closes: 35404@sibi --- modules/cragr/api/browser.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/cragr/api/browser.py b/modules/cragr/api/browser.py index a2ed7a688c..36989b4795 100644 --- a/modules/cragr/api/browser.py +++ b/modules/cragr/api/browser.py @@ -58,50 +58,60 @@ class CragrAPI(LoginBrowser): contracts_page = URL(r'particulier/operations/.rechargement.contexte.html\?idBamIndex=(?P)', r'association/operations/.rechargement.contexte.html\?idBamIndex=(?P)', r'professionnel/operations/.rechargement.contexte.html\?idBamIndex=(?P)', + r'agriculteur/operations/.rechargement.contexte.html\?idBamIndex=(?P)', r'entreprise/operations/.rechargement.contexte.html\?idBamIndex=(?P)', ContractsPage) accounts_page = URL(r'particulier/operations/synthese.html', r'association/operations/synthese.html', r'professionnel/operations/synthese.html', + r'agriculteur/operations/synthese.html', r'entreprise/operations/synthese.html', AccountsPage) account_details = URL(r'particulier/operations/synthese/jcr:content.produits-valorisation.json/(?P)', r'association/operations/synthese/jcr:content.produits-valorisation.json/(?P)', r'professionnel/operations/synthese/jcr:content.produits-valorisation.json/(?P)', + r'agriculteur/operations/synthese/jcr:content.produits-valorisation.json/(?P)', r'entreprise/operations/synthese/jcr:content.produits-valorisation.json/(?P)', AccountDetailsPage) account_iban = URL(r'particulier/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json', r'association/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json', r'professionnel/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json', + r'agriculteur/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json', r'entreprise/operations/operations-courantes/editer-rib/jcr:content.ibaninformation.json', IbanPage) cards = URL(r'particulier/operations/moyens-paiement/mes-cartes/jcr:content.listeCartesParCompte.json', r'association/operations/moyens-paiement/mes-cartes/jcr:content.listeCartesParCompte.json', r'professionnel/operations/moyens-paiement/mes-cartes/jcr:content.listeCartesParCompte.json', + r'agriculteur/operations/moyens-paiement/mes-cartes/jcr:content.listeCartesParCompte.json', r'entreprise/operations/moyens-paiement/mes-cartes/jcr:content.listeCartesParCompte.json', CardsPage) history = URL(r'particulier/operations/synthese/detail-comptes/jcr:content.n3.operations.json', r'association/operations/synthese/detail-comptes/jcr:content.n3.operations.json', r'professionnel/operations/synthese/detail-comptes/jcr:content.n3.operations.json', + r'agriculteur/operations/synthese/detail-comptes/jcr:content.n3.operations.json', r'entreprise/operations/synthese/detail-comptes/jcr:content.n3.operations.json', HistoryPage) card_history = URL(r'particulier/operations/synthese/detail-comptes/jcr:content.n3.operations.encours.carte.debit.differe.json', r'association/operations/synthese/detail-comptes/jcr:content.n3.operations.encours.carte.debit.differe.json', r'professionnel/operations/synthese/detail-comptes/jcr:content.n3.operations.encours.carte.debit.differe.json', + r'agriculteur/operations/synthese/detail-comptes/jcr:content.n3.operations.encours.carte.debit.differe.json', r'entreprise/operations/synthese/detail-comptes/jcr:content.n3.operations.encours.carte.debit.differe.json', CardHistoryPage) netfinca_redirection = URL(r'particulier/operations/moco/catitres/jcr:content.init.html', r'association/operations/moco/catitres/jcr:content.init.html', r'professionnel/operations/moco/catitres/jcr:content.init.html', + r'agriculteur/operations/moco/catitres/jcr:content.init.html', r'entreprise/operations/moco/catitres/jcr:content.init.html', r'particulier/operations/moco/catitres/_jcr_content.init.html', r'association/operations/moco/catitres/_jcr_content.init.html', r'professionnel/operations/moco/catitres/_jcr_content.init.html', + r'agriculteur/operations/moco/catitres/_jcr_content.init.html', r'entreprise/operations/moco/catitres/_jcr_content.init.html', NetfincaRedirectionPage) predica_redirection = URL(r'particulier/operations/moco/predica/jcr:content.init.html', r'association/operations/moco/predica/jcr:content.init.html', r'professionnel/operations/moco/predica/jcr:content.init.html', + r'agriculteur/operations/moco/predica/jcr:content.init.html', r'entreprise/operations/moco/predica/jcr:content.init.html', PredicaRedirectionPage) predica_investments = URL(r'https://npcprediweb.predica.credit-agricole.fr/rest/detailEpargne/contrat/', PredicaInvestmentsPage) @@ -109,12 +119,14 @@ class CragrAPI(LoginBrowser): profile_page = URL(r'particulier/operations/synthese/jcr:content.npc.store.client.json', r'association/operations/synthese/jcr:content.npc.store.client.json', r'professionnel/operations/synthese/jcr:content.npc.store.client.json', + r'agriculteur/operations/synthese/jcr:content.npc.store.client.json', r'entreprise/operations/synthese/jcr:content.npc.store.client.json', ProfilePage) profile_details = URL(r'particulier/operations/profil/infos-personnelles/gerer-coordonnees.html', ProfileDetailsPage) pro_profile_details = URL(r'association/operations/profil/infos-personnelles/controler-coordonnees.html', r'professionnel/operations/profil/infos-personnelles/controler-coordonnees.html', + r'agriculteur/operations/profil/infos-personnelles/controler-coordonnees.html', r'entreprise/operations/profil/infos-personnelles/controler-coordonnees.html', ProProfileDetailsPage) def __init__(self, website, *args, **kwargs): @@ -160,7 +172,7 @@ def do_login(self): if 'Un incident technique' in message: raise BrowserUnavailable(message) - # accounts_url may contain '/particulier', '/professionnel', '/entreprise' or '/association' + # accounts_url may contain '/particulier', '/professionnel', '/entreprise', '/agriculteur' or '/association' self.accounts_url = self.page.get_accounts_url() assert self.accounts_url, 'Could not get accounts url from security check' self.location(self.accounts_url) -- GitLab