From 7f6281122d7b32c80e0c4dc7456b1f4676378a3d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 7 Jun 2012 15:53:00 +0200 Subject: [PATCH] get maximum of transactions in history --- modules/bp/browser.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/bp/browser.py b/modules/bp/browser.py index 66a4851a..d3b6891e 100644 --- a/modules/bp/browser.py +++ b/modules/bp/browser.py @@ -18,6 +18,7 @@ # along with weboob. If not, see . +from urlparse import urlsplit, parse_qsl from datetime import datetime from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword, BrowserBanned @@ -89,8 +90,12 @@ class BPBrowser(BaseBrowser): self.location("https://voscomptesenligne.labanquepostale.fr/voscomptes/canalXHTML/comptesCommun/synthese_assurancesEtComptes/rechercheContratAssurance-synthese.ea") return self.page.get_account(id) - def get_history(self, Account): - self.location(Account._link_id) + def get_history(self, account): + v = urlsplit(account._link_id) + args = dict(parse_qsl(v.query)) + args['typeRecherche'] = 10 + + self.location(self.buildurl(v.path, **args)) if not self.is_on_page(AccountHistory): return iter([]) return self.page.get_history()