fix navigation
This commit is contained in:
parent
e1db34da1c
commit
0329c73067
2 changed files with 7 additions and 1 deletions
|
|
@ -94,6 +94,9 @@ class Barclays(BaseBrowser):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_history(self, account):
|
def get_history(self, account):
|
||||||
|
if not self.is_on_page(AccountsPage):
|
||||||
|
self.location('tbord.do')
|
||||||
|
|
||||||
self.location(account._link)
|
self.location(account._link)
|
||||||
|
|
||||||
assert self.is_on_page((TransactionsPage, ValuationPage))
|
assert self.is_on_page((TransactionsPage, ValuationPage))
|
||||||
|
|
@ -101,6 +104,9 @@ class Barclays(BaseBrowser):
|
||||||
return self.page.get_history()
|
return self.page.get_history()
|
||||||
|
|
||||||
def get_coming_operations(self, account):
|
def get_coming_operations(self, account):
|
||||||
|
if not self.is_on_page(AccountsPage):
|
||||||
|
self.location('tbord.do')
|
||||||
|
|
||||||
for card in account._card_links:
|
for card in account._card_links:
|
||||||
self.location(card)
|
self.location(card)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ class CardPage(BasePage):
|
||||||
raw = u' '.join([txt.strip() for txt in tds[1].itertext()])
|
raw = u' '.join([txt.strip() for txt in tds[1].itertext()])
|
||||||
amount = u''.join([txt.strip() for txt in tds[-1].itertext()])
|
amount = u''.join([txt.strip() for txt in tds[-1].itertext()])
|
||||||
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
||||||
t.label = tds[1].find('span').text.strip()
|
t.label = unicode(tds[1].find('span').text.strip())
|
||||||
t.type = t.TYPE_CARD
|
t.type = t.TYPE_CARD
|
||||||
t.set_amount(amount)
|
t.set_amount(amount)
|
||||||
yield t
|
yield t
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue