From 2d4635b3e6b99f42180a807960d91e82478c489f Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 23 Apr 2012 11:00:39 +0200 Subject: [PATCH] don't list bourse accounts --- modules/bp/browser.py | 2 ++ modules/bp/pages/accountlist.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/bp/browser.py b/modules/bp/browser.py index e7518989..66a4851a 100644 --- a/modules/bp/browser.py +++ b/modules/bp/browser.py @@ -91,6 +91,8 @@ class BPBrowser(BaseBrowser): def get_history(self, Account): self.location(Account._link_id) + if not self.is_on_page(AccountHistory): + return iter([]) return self.page.get_history() def make_transfer(self, from_account, to_account, amount): diff --git a/modules/bp/pages/accountlist.py b/modules/bp/pages/accountlist.py index e3028eb0..8a538bf7 100644 --- a/modules/bp/pages/accountlist.py +++ b/modules/bp/pages/accountlist.py @@ -51,6 +51,8 @@ class AccountList(BasePage): tmp = line.xpath("./td//a")[0] account.label = to_unicode(tmp.text) account._link_id = tmp.get("href") + if 'BourseEnLigne' in account._link_id: + continue tmp = line.xpath("./td/span/strong") if len(tmp) >= 2: