Boursorama asks to go to interactive mode, then fails
With which module do you encounter problems?
Bank, Boursorama
Describe the problem you encounter
Trying to get data from Boursorama fails with
You have to run bank in interactive mode to perform a two-factor authentication
Unable to find element //form[@name="form"]/div[@data-strong-authentication-payload]
# /usr/local/bin/woob bank history <myaccount>@boursorama -f json -n 16 --auto-update
=== [ 7%] Module cmso is not installed yet
=== [ 10%] Downloading module...
=== [ 17%] Checking module authenticity...
=== [ 23%] Setting up module...
=== [ 30%] Downloading icon...
=== [ 33%] Module cmso has been installed!
=== [ 40%] Module allianzbanque is not installed yet
=== [ 43%] Downloading module...
=== [ 50%] Checking module authenticity...
=== [ 57%] Setting up module...
=== [ 63%] Downloading icon...
=== [ 67%] Module allianzbanque has been installed!
=== [ 73%] Module axabanque is not installed yet
=== [ 77%] Downloading module...
=== [ 83%] Checking module authenticity...
=== [ 90%] Setting up module...
=== [ 97%] Downloading icon...
=== [100%] Module axabanque has been installed!
=== [ 20%] Module boursorama is not installed yet
=== [ 30%] Downloading module...
=== [ 50%] Checking module authenticity...
=== [ 70%] Setting up module...
=== [ 90%] Downloading icon...
=== [100%] Module boursorama has been installed!
Error(boursorama): You have to run bank in interactive mode to perform a two-factor authentication
[]
Ok then,
# /usr/local/bin/woob bank
Unable to load formatter "table": Please install python-prettytable
Falling back to "multiline".
Welcome to bank v3.6
Copyright(C) 2010-2023 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Type "help" to display available commands.
Loaded backends: axabanque, boursorama
bank> list
Account Balance Coming
------------------------------------------+----------+----------
Bug(boursorama): Unable to find element //form[@name="form"]/div[@data-strong-authentication-payload]
(If --auto-update is passed on the command-line, new versions of the module will be checked automatically)
Use "logging debug" option to print backtraces.
#1 (axabanque) COMPTE COURANT 2 xx.xx 0.00
------------------------------------------+----------+----------
Total (EUR) xx.xx 0.00
bank>
Paste here the stacktrace or error message you observe
Bug(boursorama): Unable to find element //form[@name="form"]/div[@data-strong-authentication-payload]
(If --auto-update is passed on the command-line, new versions of the module will be checked automatically)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/html.py", line 107, in filter
return '%s' % el[0].attrib[self.attr]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/woob/core/bcall.py", line 88, in backend_process
result = function(backend, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/woob/tools/application/base.py", line 348, in _do_complete
res = getattr(backend, function)(*args, **kwargs)
File "/root/.local/share/woob/modules/3.6/woob_modules/boursorama/module.py", line 188, in iter_resources
return self.iter_accounts()
File "/root/.local/share/woob/modules/3.6/woob_modules/boursorama/module.py", line 68, in iter_accounts
return self.browser.get_accounts_list()
File "/usr/local/lib/python3.8/dist-packages/woob/browser/retry.py", line 75, in wrapper
ret = cb()
File "/usr/local/lib/python3.8/dist-packages/woob/browser/retry.py", line 71, in <lambda>
cb = lambda: func(browser, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/woob/browser/browsers.py", line 1118, in inner
browser.do_login()
File "/usr/local/lib/python3.8/dist-packages/woob/browser/retry.py", line 43, in wrapper
return func(browser, *args, **kwargs)
File "/root/.local/share/woob/modules/3.6/woob_modules/boursorama/browser.py", line 476, in do_login
return super(BoursoramaBrowser, self).do_login()
File "/usr/local/lib/python3.8/dist-packages/woob/browser/mfa.py", line 201, in do_double_authentication
self.init_login()
File "/root/.local/share/woob/modules/3.6/woob_modules/boursorama/browser.py", line 459, in init_login
self.handle_authentication()
File "/root/.local/share/woob/modules/3.6/woob_modules/boursorama/browser.py", line 335, in handle_authentication
self.otp_number = self.page.get_otp_number()
File "/root/.local/share/woob/modules/3.6/woob_modules/boursorama/pages.py", line 131, in get_otp_number
return Regexp(
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/base.py", line 188, in __call__
return self.filter(self.select(self.selector, item))
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/base.py", line 172, in select
ret = selector(item)
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/base.py", line 188, in __call__
return self.filter(self.select(self.selector, item))
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/base.py", line 136, in wrapper
res = function(self, value)
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/html.py", line 109, in filter
return self.default_or_raise(XPathNotFound('Unable to find element %s' % self.selector))
File "/usr/local/lib/python3.8/dist-packages/woob/browser/filters/base.py", line 71, in default_or_raise
raise exception
woob.browser.filters.html.XPathNotFound: Unable to find element //form[@name="form"]/div[@data-strong-authentication-payload]
What are the steps to reproduce the problem?
See above
What woob version are you using?
Latest from git as of today.
Output of woob config --version
command:
Woob config v3.6 Copyright(C) 2010-2023 Christophe Benz, Romain Bignon
What module version are you using?
Output of woob config info MODULE_NAME
command:
.------------------------------------------------------------------------------.
| Module boursorama |
+-----------------.------------------------------------------------------------'
| Version | 202305231553
| Maintainer | Gabriel Kerneis <gabriel@kerneis.info>
| License | LGPLv3+
| Description | Boursorama
| Capabilities | CapTransfer, CapCollection, CapBank, CapBankWealth, CapProfile, CapContact, CapDocument, CapBankTransferAddRecipient, CapBankTransfer, CapCredentialsCheck, CapCurrencyRate
| Installed | yes
| Location | https://updates.woob.tech/3/main/boursorama.tar.gz
| |
| Configuration | login: Identifiant (default: )
| | password: Mot de passe (default: )
'-----------------'
How did you install woob?
git clone https://gitlab.com/woob/woob.git --depth 1
cd woob && pip install .
woob update