From 7e9bad617813fe60a2be5d4ae8ee337975b783a0 Mon Sep 17 00:00:00 2001 From: Jocelyn Jaubert Date: Thu, 26 Jan 2012 21:42:04 +0100 Subject: [PATCH] SG: update account page list to changes on webpage Signed-off-by: Jocelyn Jaubert Signed-off-by: Romain Bignon --- modules/societegenerale/pages/accounts_list.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/societegenerale/pages/accounts_list.py b/modules/societegenerale/pages/accounts_list.py index a18f918b..652f69dc 100644 --- a/modules/societegenerale/pages/accounts_list.py +++ b/modules/societegenerale/pages/accounts_list.py @@ -32,12 +32,12 @@ class AccountsList(BasePage): def get_list(self): l = [] for tr in self.document.getiterator('tr'): - if tr.attrib.get('class', '') == 'LGNTableRow': + if 'LGNTableRow' in tr.attrib.get('class', '').split(): account = Account() for td in tr.getiterator('td'): if td.attrib.get('headers', '') == 'TypeCompte': a = td.find('a') - account.label = a.text + account.label = a.find("span").text account.link_id = a.get('href', '') elif td.attrib.get('headers', '') == 'NumeroCompte': @@ -49,9 +49,9 @@ class AccountsList(BasePage): pass elif td.attrib.get('headers', '') == 'Solde': - balance = td.text - balance = balance.replace(u'\xa0','').replace(',','.') - if balance != "": + balance = td.find('div').text + if balance != None: + balance = balance.replace(u'\xa0','').replace(',','.') account.balance = float(balance) else: account.balance = 0.0