fix parsing on special cases
This commit is contained in:
parent
0419556b1b
commit
f9f6049019
2 changed files with 13 additions and 4 deletions
|
|
@ -42,7 +42,12 @@ class AccountsList(BasePage):
|
|||
break
|
||||
|
||||
elif td.attrib.get('class', '') == 'account-name':
|
||||
account.label = self.parser.tocleanstring(td.xpath('./span[@class="label"]')[0])
|
||||
try:
|
||||
span = td.xpath('./span[@class="label"]')[0]
|
||||
except IndexError:
|
||||
# ignore account
|
||||
break
|
||||
account.label = self.parser.tocleanstring(span)
|
||||
account._link_id = td.xpath('.//a')[0].attrib['href']
|
||||
|
||||
elif td.attrib.get('class', '') == 'account-more-actions':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue