The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit 2cd5e993 authored by Martin Lavoie's avatar Martin Lavoie Committed by Vincent A

[caissedepargne] Add timestamp when requesting the config page

The website started returning 403 without this parameter.
Another possible solution was to change the User-Agent.

Closes: 7081@sibi
parent 12836194
......@@ -151,7 +151,10 @@ class CaisseEpargneLogin(LoginBrowser, StatesMixin):
new_login = URL(r'https://www.caisse-epargne.fr/se-connecter/sso', NewLoginPage)
js_file = URL(r'https://www.caisse-epargne.fr/se-connecter/main-.*.js$', JsFilePage)
config_page = URL('https://www.caisse-epargne.fr/ria/pas/configuration/config.json', ConfigPage)
config_page = URL(
r'https://www.caisse-epargne.fr/ria/pas/configuration/config.json\?ts=(?P<timestamp>.*)',
ConfigPage
)
token_page = URL(r'https://www.as-ex-ano-groupe.caisse-epargne.fr/api/oauth/token', TokenPage)
login_api = URL(
r'https://www.rs-ex-ano-groupe.caisse-epargne.fr/bapi/user/v1/users/identificationRouting',
......@@ -810,7 +813,8 @@ def do_new_login(self, authentification_data=''):
client_id = self.page.get_client_id()
nonce = self.page.get_nonce() # Hardcoded in their js...
if not self.continue_url:
self.config_page.go()
timestamp = int(time.time() * 1000)
self.config_page.go(timestamp=timestamp)
self.continue_url = self.page.get_continue_url(self.cdetab, self.connection_type)
# On the website, this sends back json because of the header
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment