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

Commit ebe0286a authored by Edouard Lambert's avatar Edouard Lambert Committed by Vincent Ardisson

[bnporc] handle 2FA with an ActionNeeded

For now the 2FA is cross browser,
so the user can validate it through his browser.
parent 2f4007f0
......@@ -41,7 +41,7 @@
from weboob.browser.elements import DataError
from weboob.exceptions import (
BrowserIncorrectPassword, BrowserUnavailable, AppValidation,
AppValidationExpired, ActionNeeded,
from import Value
from import create_french_liquidity
......@@ -53,7 +53,7 @@
MarketListPage, MarketPage, MarketHistoryPage, MarketSynPage, BNPKeyboard,
RecipientsPage, ValidateTransferPage, RegisterTransferPage, AdvisorPage,
AddRecipPage, ActivateRecipPage, ProfilePage, ListDetailCardPage, ListErrorPage,
UselessPage, TransferAssertionError, LoanDetailsPage, TransfersPage,
UselessPage, TransferAssertionError, LoanDetailsPage, TransfersPage, OTPPage,
from .document_pages import DocumentsPage, DocumentsResearchPage, TitulairePage, RIBPage
......@@ -76,6 +76,7 @@ class BNPParibasBrowser(LoginBrowser, StatesMixin):
useless_page = URL(r'/fr/connexion/comptes-et-contrats', UselessPage)
otp = URL(r'/fr/espace-prive/authentification-forte-anr', OTPPage)
con_threshold = URL(
......@@ -205,6 +206,10 @@ def iter_accounts(self):
if not self.ibans.is_here():
if self.otp.is_here():
raise ActionNeeded("Veuillez réaliser l'authentification forte depuis votre navigateur.")
ibans =
# This page might be unavailable.
......@@ -282,6 +282,10 @@ def login(self, username, password):
class OTPPage(HTMLPage):
class BNPPage(LoggedPage, JsonPage):
def build_doc(self, text):
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