From da3330c7c95f27d83038884eaaf7b9bab50e66b9 Mon Sep 17 00:00:00 2001 From: Maxime Gasselin Date: Thu, 5 Nov 2020 16:00:10 +0100 Subject: [PATCH] [creditmutuel] follow redirect for conditions-generales In this case we must follow the location redirection. This redirection seems happens when some cookies expire and is not alway reproducible. Indeed this url is catched by ConditionsPage and the empty 302 parsing failed. --- modules/creditmutuel/browser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/creditmutuel/browser.py b/modules/creditmutuel/browser.py index 3695a5cf3e..7a2b6d6238 100644 --- a/modules/creditmutuel/browser.py +++ b/modules/creditmutuel/browser.py @@ -365,7 +365,10 @@ def check_redirections(self): self.twofa_auth_state = {} self.check_interactive() elif location: - self.location(location, allow_redirects=False) + allow_redirects = 'conditions-generales' in location + # Don't stay on this 302 + # This URL is still caught by ConditionsPage + self.location(location, allow_redirects=allow_redirects) def check_auth_methods(self): self.getCurrentSubBank() -- GitLab