From 2692aba0e70328b31727ff01ec9b71266f5a954d Mon Sep 17 00:00:00 2001 From: Nicolas Vergnac Date: Thu, 17 Jun 2021 14:10:10 +0200 Subject: [PATCH] [caissedepargne] create 'enseigne' parameter for caissedepargne browser and its children add enseigne parameter to replace a harcoded value in params of the "authorize" request to retrieve a form from a specific website that parameter has been added to all caissederpargne children for cenet and regular browser Closes: 34443@zendesk --- modules/btpbanque/caisseepargne_browser.py | 1 + modules/btpbanque/cenet_browser.py | 1 + modules/caissedepargne/browser.py | 3 ++- modules/creditcooperatif/caisseepargne_browser.py | 1 + modules/creditcooperatif/cenet_browser.py | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/btpbanque/caisseepargne_browser.py b/modules/btpbanque/caisseepargne_browser.py index 531d098962..ff69934eb8 100644 --- a/modules/btpbanque/caisseepargne_browser.py +++ b/modules/btpbanque/caisseepargne_browser.py @@ -31,6 +31,7 @@ class CaisseEpargneBrowser(AbstractBrowser): BASEURL = 'https://www.btp-banque.fr' CENET_URL = 'https://www.entreprises.btp-banque.fr' + enseigne = 'btp' login = URL( r'https://www.btp-banque.fr/authentification/manage\?step=identification&identifiant=(?P.*)', diff --git a/modules/btpbanque/cenet_browser.py b/modules/btpbanque/cenet_browser.py index d70a2bc6a6..deea58e32f 100644 --- a/modules/btpbanque/cenet_browser.py +++ b/modules/btpbanque/cenet_browser.py @@ -29,6 +29,7 @@ class CenetBrowser(AbstractBrowser): PARENT = 'caissedepargne' PARENT_ATTR = 'package.cenet.browser.CenetBrowser' BASEURL = 'https://www.entreprises.btp-banque.fr' + enseigne = 'btp' login = URL( r'https://www.btp-banque.fr/authentification/manage\?step=identification&identifiant=(?P.*)', diff --git a/modules/caissedepargne/browser.py b/modules/caissedepargne/browser.py index 7af33b7a7c..7e47e05ca4 100644 --- a/modules/caissedepargne/browser.py +++ b/modules/caissedepargne/browser.py @@ -140,6 +140,7 @@ class CaisseEpargneLogin(LoginBrowser, StatesMixin): STATE_DURATION = 5 API_LOGIN = True CENET_URL = 'https://www.cenet.caisse-epargne.fr' + enseigne = 'ce' login = URL( r'https://www.caisse-epargne.fr/authentification/manage\?step=identification&identifiant=(?P.*)', r'https://.*/authentification/manage\?step=identification&identifiant=.*', @@ -830,7 +831,7 @@ def do_new_login(self, authentification_data=''): bpcesta = { "csid": csid, "typ_app": "rest", - "enseigne": "ce", + "enseigne": self.enseigne, "typ_sp": "out-band", "typ_act": "auth", "snid": snid, diff --git a/modules/creditcooperatif/caisseepargne_browser.py b/modules/creditcooperatif/caisseepargne_browser.py index 5c574538fd..b8e4185d2c 100644 --- a/modules/creditcooperatif/caisseepargne_browser.py +++ b/modules/creditcooperatif/caisseepargne_browser.py @@ -32,6 +32,7 @@ class CaisseEpargneBrowser(AbstractBrowser): BASEURL = 'https://www.credit-cooperatif.coop' CENET_URL = 'https://www.espaceclient.credit-cooperatif.coop' + enseigne = 'ccoop' login = URL( r'https://www.credit-cooperatif.coop/authentification/manage\?step=identification&identifiant=(?P.*)', diff --git a/modules/creditcooperatif/cenet_browser.py b/modules/creditcooperatif/cenet_browser.py index 68d1d1510b..5af24aff4d 100644 --- a/modules/creditcooperatif/cenet_browser.py +++ b/modules/creditcooperatif/cenet_browser.py @@ -31,6 +31,7 @@ class CenetBrowser(AbstractBrowser): PARENT = 'caissedepargne' PARENT_ATTR = 'package.cenet.browser.CenetBrowser' BASEURL = 'https://www.espaceclient.credit-cooperatif.coop/' + enseigne = 'ccoop' login = URL( r'https://www.credit-cooperatif.coop/authentification/manage\?step=identification&identifiant=(?P.*)', -- GitLab