Commit 76445cc7 authored by Damien Mat's avatar Damien Mat Committed by Vincent A

[bnporc] Fixed old url used for HistoryPage

Commit 246836bbf162dcd1fac9a56b844a058a771ff51f updated the url used for
comings and history.
For some connections the former url is still used. We don't knwow which
ones do. It cannot be declared in the same URL object since it is used in a .go() method that
might raise a BrowserUnavailable.

Closes: 12950@zendesk, 25845@sibi
parent e3433c67
......@@ -37,7 +37,7 @@ from import sorted_transactions
from import json
from weboob.browser.exceptions import ServerError
from weboob.browser.elements import DataError
from weboob.exceptions import BrowserIncorrectPassword
from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable
from import Value, ValueBool
from import create_french_liquidity
......@@ -100,6 +100,7 @@ class BNPParibasBrowser(JsonBrowserMixin, LoginBrowser):
loan_details = URL(r'caraccomptes-wspl/rpc/(?P<loan_type>.*)', LoanDetailsPage)
ibans = URL(r'rib-wspl/rpc/comptes', AccountsIBANPage)
history = URL(r'rop2-wspl/rest/releveOp', HistoryPage)
history_old = URL(r'rop-wspl/rest/releveOp', HistoryPage)
transfer_init = URL(r'virement-wspl/rest/initialisationVirement', TransferInitPage)
lifeinsurances = URL(r'mefav-wspl/rest/infosContrat', LifeInsurancesPage)
......@@ -280,14 +281,21 @@ class BNPParibasBrowser(JsonBrowserMixin, LoginBrowser):
if not self.card_to_transaction_type:
self.card_to_transaction_type =
data = JSON({
"pastOrPending": 1,
"triAV": 0,
"startDate": ( - relativedelta(years=1)).strftime('%d%m%Y'),
except BrowserUnavailable:
# old url is still used for certain connections bu we don't know which one is,
# so the same HistoryPage is attained by the old url in another URL object
data[1]['startDate'] = ( - relativedelta(years=3)).strftime('%d%m%Y')
# old url authorizes up to 3 years of history
if coming:
return sorted_transactions(
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