Commit b2ac27f3 authored by Romain Bignon's avatar Romain Bignon

boursorama: cleanup useless things, and use ValueTransient

parent e00cc9b2
Pipeline #2966 passed with stages
in 12 minutes and 53 seconds
......@@ -163,18 +163,13 @@ class BoursoramaBrowser(RetryLoginBrowser, TwoFactorBrowser):
def handle_authentication(self):
if self.authentication.is_here():
if self.config['enable_twofactors'].get():
confirmation_link =
if confirmation_link:
raise BrowserIncorrectAuthenticationCode(
"""Boursorama - activate the two factor authentication in boursorama config."""
""" You will receive SMS code but are limited in request per day (around 15)"""
confirmation_link =
if confirmation_link:
def handle_sms(self):
# regular 2FA way
......@@ -192,8 +187,6 @@ class BoursoramaBrowser(RetryLoginBrowser, TwoFactorBrowser):
raise BrowserIncorrectAuthenticationCode()
def init_login(self):
assert isinstance(self.config['device'].get(), basestring)
assert isinstance(self.config['enable_twofactors'].get(), bool)
if not self.password.isalnum():
raise BrowserIncorrectPassword()
......@@ -28,7 +28,7 @@ from import CapBankWealth, CapBankTransferAddRecipient,
from weboob.capabilities.profile import CapProfile
from import CapContact
from import Module, BackendConfig
from import ValueBackendPassword, ValueBool, Value
from import ValueBackendPassword, ValueTransient
from .browser import BoursoramaBrowser
......@@ -45,10 +45,8 @@ class BoursoramaModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapPr
DESCRIPTION = u'Boursorama'
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
ValueBackendPassword('password', label='Mot de passe'),
ValueBool('enable_twofactors', label='Send validation sms', default=False),
Value('device', label='Device name', regexp='\w*', default='weboob'),
Value('pin_code', label='Sms code', required=False, default=''),
Value('request_information', default=None, noprompt=True, required=False),
BROWSER = BoursoramaBrowser
......@@ -52,10 +52,6 @@ from import urljoin, urlencode, urlparse, range
from weboob.exceptions import BrowserQuestion, BrowserIncorrectPassword, BrowserHTTPNotFound, BrowserUnavailable, ActionNeeded
class BrowserAuthenticationCodeMaxLimit(BrowserIncorrectPassword):
class IncidentPage(HTMLPage):
......@@ -89,8 +85,6 @@ class AuthenticationPage(HTMLPage):
This function simulates the registration of a device on
boursorama two factor authentification web page.
@param device device name to register
@exception BrowserAuthenticationCodeMaxLimit when daily limit is consumed
form = self.get_form()
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