fix website changes (virtual keyboard, accounts list) closes #1696

This commit is contained in:
Romain Bignon 2014-12-18 11:27:09 +01:00
commit 4530278c1e
3 changed files with 12 additions and 13 deletions

View file

@ -49,7 +49,7 @@ class AccountsList(Page):
# ignore account
break
account.type = Account.TYPE_CARD
account.label = self.parser.tocleanstring(a)
account.label, account.id = [s.strip() for s in self.parser.tocleanstring(td).rsplit('-', 1)]
try:
account._link_id = td.xpath('.//a')[0].get('href')
except KeyError:
@ -62,6 +62,7 @@ class AccountsList(Page):
# ignore account
break
account.label = self.parser.tocleanstring(span)
account.id = self.parser.tocleanstring(td).rsplit('-', 1)[-1].strip()
try:
account._link_id = td.xpath('.//a')[0].get('href')
account._detail_url = account._link_id