support history of coming transactions
This commit is contained in:
parent
5a39b77ed6
commit
9d3d8eb1a1
2 changed files with 10 additions and 2 deletions
|
|
@ -58,5 +58,12 @@ class HSBCBackend(BaseBackend, ICapBank):
|
|||
|
||||
def iter_history(self, account):
|
||||
with self.browser:
|
||||
for history in self.browser.get_history(account._link_id):
|
||||
yield history
|
||||
for tr in self.browser.get_history(account._link_id):
|
||||
if not tr._coming:
|
||||
yield tr
|
||||
|
||||
def iter_coming(self, account):
|
||||
with self.browser:
|
||||
for tr in self.browser.get_history(account._link_id):
|
||||
if tr._coming:
|
||||
yield tr
|
||||
|
|
|
|||
|
|
@ -80,4 +80,5 @@ class HistoryPage(BasePage):
|
|||
op = Transaction(m.group(1))
|
||||
op.parse(date=m.group(3), raw=re.sub(u'[ ]+', u' ', m.group(4).replace(u'\n', u' ')))
|
||||
op.set_amount(m.group(5))
|
||||
op._coming = (re.match('\d+/\d+/\d+', m.group(2)) is None)
|
||||
yield op
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue