boursorama: ignore spurious accounts

account.id must be a string.
This commit is contained in:
Gabriel Kerneis 2012-04-01 14:31:54 +02:00 committed by Romain Bignon
commit 30a0f916bf

View file

@ -35,6 +35,7 @@ class AccountsList(BasePage):
if div.attrib.get('id', '') == 'synthese-list':
for tr in div.getiterator('tr'):
account = Account()
account.id = None
for td in tr.getiterator('td'):
if td.attrib.get('class', '') == 'account-cb':
break
@ -63,7 +64,7 @@ class AccountsList(BasePage):
else:
# because of some weird useless <tr>
if account.id != 0:
if account.id is not None:
l.append(account)
return l