Take the operation id of the bank
This commit is contained in:
parent
41c25f4611
commit
2ddf8f66b9
2 changed files with 2 additions and 3 deletions
|
|
@ -95,8 +95,6 @@ class Boursorama(BaseBrowser):
|
||||||
target = date.today() - relativedelta(months=2)
|
target = date.today() - relativedelta(months=2)
|
||||||
self.location(account._link_id + ("&month=%d&year=%d" % (target.month, target.year)))
|
self.location(account._link_id + ("&month=%d&year=%d" % (target.month, target.year)))
|
||||||
operations += self.page.get_operations()
|
operations += self.page.get_operations()
|
||||||
for index, op in enumerate(operations):
|
|
||||||
op.id = index
|
|
||||||
|
|
||||||
return operations
|
return operations
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ class AccountHistory(BasePage):
|
||||||
# tds[1]: valeur
|
# tds[1]: valeur
|
||||||
d = date(*reversed([int(x) for x in tds[1].text.split('/')]))
|
d = date(*reversed([int(x) for x in tds[1].text.split('/')]))
|
||||||
labeldiv = tds[2].find('div')
|
labeldiv = tds[2].find('div')
|
||||||
|
inputid = tds[5].find('input[@type="hidden"]')
|
||||||
label = u''
|
label = u''
|
||||||
label += labeldiv.text
|
label += labeldiv.text
|
||||||
if labeldiv.find('a') is not None:
|
if labeldiv.find('a') is not None:
|
||||||
|
|
@ -69,7 +70,7 @@ class AccountHistory(BasePage):
|
||||||
debit = tds[3].text or ""
|
debit = tds[3].text or ""
|
||||||
credit = tds[4].text or ""
|
credit = tds[4].text or ""
|
||||||
|
|
||||||
operation = Transaction(len(self.operations))
|
operation = Transaction(inputid.attrib['id'].split('_')[1])
|
||||||
operation.parse(date=d, raw=label)
|
operation.parse(date=d, raw=label)
|
||||||
operation.set_amount(credit, debit)
|
operation.set_amount(credit, debit)
|
||||||
operation.category = category
|
operation.category = category
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue