fix parsing accounts list when there is no history associated
This commit is contained in:
parent
bccb4d0d03
commit
b97e597c6e
1 changed files with 2 additions and 1 deletions
|
|
@ -50,7 +50,8 @@ class AccountsPage(BasePage):
|
||||||
|
|
||||||
for tr in self.document.getiterator('tr'):
|
for tr in self.document.getiterator('tr'):
|
||||||
first_td = tr.getchildren()[0]
|
first_td = tr.getchildren()[0]
|
||||||
if first_td.attrib.get('class', '') == 'i g' or first_td.attrib.get('class', '') == 'p g':
|
if (first_td.attrib.get('class', '') == 'i g' or first_td.attrib.get('class', '') == 'p g') \
|
||||||
|
and first_td.find('a') is not None:
|
||||||
account = Account()
|
account = Account()
|
||||||
account.label = u"%s"%first_td.find('a').text.strip().lstrip(' 0123456789')
|
account.label = u"%s"%first_td.find('a').text.strip().lstrip(' 0123456789')
|
||||||
account._link_id = first_td.find('a').get('href', '')
|
account._link_id = first_td.find('a').get('href', '')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue