From 9f9513845cf51bcf4f3ac10aac24b8e1604bcee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Sobucki?= <168-ssobucki@users.noreply.gitlab.budget-insight.com> Date: Tue, 19 Jan 2021 12:49:06 +0100 Subject: [PATCH] [boursorama] Fix: Handle logged out redirect While fetching accounts, we can get disconnected. The redirect URL was not handled, so we would never try to relogin to the website. --- modules/boursorama/browser.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index 793ad7f2d3..e3133f385e 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -90,7 +90,13 @@ class BoursoramaBrowser(RetryLoginBrowser, TwoFactorBrowser): '/infos-profil', ErrorPage ) - login = URL(r'/connexion/saisie-mot-de-passe', PasswordPage) + login = URL( + r'/connexion/saisie-mot-de-passe', + # When getting logged out, we get redirected to + # either /connexion/ or /connexion/?ubiquite=1 + r'/connexion/(\?ubiquite=1)?$', + PasswordPage + ) minor = URL(r'/connexion/mineur', MinorPage) accounts = URL(r'/dashboard/comptes\?_hinclude=300000', AccountsPage) accounts_error = URL(r'/dashboard/comptes\?_hinclude=300000', AccountsErrorPage) -- GitLab