diff --git a/.gitignore b/.gitignore index 4f44d5787f4a5737cc4b68043ba56efc861dc82c..5d0a145826e0209b8922faa5b2017914293c7ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ tags docs/source/api modules/modules.list /localconfig +*.idea/ +*.DS_Store diff --git a/modules/axabanque/pages.py b/modules/axabanque/pages.py index 6da1c163b5cdf496b09b63372c3f888d63a12f64..98f45bd49ffdd08a91c61995062cafb84480e2dd 100644 --- a/modules/axabanque/pages.py +++ b/modules/axabanque/pages.py @@ -291,7 +291,7 @@ def get_history(self): if len(tds) < 4: continue - t = Transaction(0) + t = Transaction() date = u''.join([txt.strip() for txt in tds[self.COL_DATE].itertext()]) raw = u''.join([txt.strip() for txt in tds[self.COL_TEXT].itertext()]) debit = self.parse_number(u''.join([txt.strip() for txt in tds[self.COL_DEBIT].itertext()])) @@ -317,7 +317,7 @@ def get_history(self): if len(tds) < 3: continue - t = Transaction(0) + t = Transaction() date = u''.join([txt.strip() for txt in tds[self.COL_DATE].itertext()]) raw = self.parse_number(u''.join([txt.strip() for txt in tds[self.COL_TEXT].itertext()])) credit = self.parse_number(u''.join([txt.strip() for txt in tds[self.COL_CB_CREDIT].itertext()])) diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index 67fa99ec682cdf63ff019136b706ba442be28b51..34d50ee354b70eecfc36b6466094f3cc9f4b88b1 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -636,7 +636,7 @@ def get_card_history(self, account, coming): else: debit_date = account._prev_debit if 'ContinueTask.do' in self.url: - t = Transaction(0) + t = Transaction() t.parse(debit_date, 'RELEVE CARTE') t.amount = -account._prev_balance yield t @@ -647,7 +647,7 @@ def get_card_history(self, account, coming): if len(tds) < 3: continue - t = Transaction(i) + t = Transaction() date = self.parser.tocleanstring(tds[self.COL_CARD_DATE]) label = self.parser.tocleanstring(tds[self.COL_CARD_LABEL]) diff --git a/modules/barclays/pages.py b/modules/barclays/pages.py index 25e999c65c1743169e5eb370ffecc422cd65e256..69e50169ad25a904192d738bcecb9072547cefcd 100644 --- a/modules/barclays/pages.py +++ b/modules/barclays/pages.py @@ -238,7 +238,7 @@ def get_history(self): if len(tds) != 3: continue - t = Transaction(0) + t = Transaction() date = u''.join([txt.strip() for txt in tds[0].itertext()]) raw = u' '.join([txt.strip() for txt in tds[1].itertext()]) amount = u''.join([txt.strip() for txt in tds[-1].itertext()]) diff --git a/modules/bnporc/enterprise/pages.py b/modules/bnporc/enterprise/pages.py index 27c76c7e78995b1303a657999617972d9b8f0137..af6575ea5271b758339617cbc487a701cb3a9552 100644 --- a/modules/bnporc/enterprise/pages.py +++ b/modules/bnporc/enterprise/pages.py @@ -246,7 +246,7 @@ def iter_history(self): tdamount = '- %s' % tddebit else: tdamount = tdcredit - t = Transaction(i) + t = Transaction() t.set_amount(tdamount) t.parse(tddate, tdlabel, tdval) diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index d75d6dd6915eca73d357eacb339574bb02cab218..de772ea6dedf1bd1d0c94db6f4a408e1caa0a21b 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -316,7 +316,7 @@ def get_history(self): if len(detail) > 0: detail[0].drop_tree() - t = Transaction(i) + t = Transaction() date = u''.join([txt.strip() for txt in tds[i+0].itertext()]) raw = u' '.join([txt.strip() for txt in tds[i+1].itertext()]) diff --git a/modules/cmso/mobile/pages.py b/modules/cmso/mobile/pages.py index 7c816e824b3c8d73956821452e745fc790668838..a9f421c2c0f1f214fbde5cec1e987f56ad757d7a 100644 --- a/modules/cmso/mobile/pages.py +++ b/modules/cmso/mobile/pages.py @@ -63,7 +63,7 @@ def get_next_link(self): def get_history(self): for div in self.document.xpath('//ol[@class="affichMontant"]/li/div'): - t = Transaction(0) + t = Transaction() raw = div.xpath('.//div[@class="row-lib"]')[0].text date = div.xpath('.//span')[0].text.strip() m = re.match('(\d+)(er)? ([^ ]+)( \d+)?$', date) diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py index 2c593b812f7de49c6d6159fce011240b05f77200..a1c6bd999b21575cf358136407a86832e0579035 100644 --- a/modules/cragr/web/pages.py +++ b/modules/cragr/web/pages.py @@ -294,7 +294,7 @@ def get_history(self, date_guesser): label = cols[1] amount = cols[-1] - t = Transaction(i) + t = Transaction() t.set_amount(amount) t.label = t.raw = label @@ -432,7 +432,6 @@ def get_order_by_date_url(self): } def get_history(self, date_guesser): - i = 0 for tr in self.document.xpath('//table[@class="ca-table"]//tr'): parent = tr.getparent() while parent is not None and parent.tag != 'table': @@ -461,7 +460,7 @@ def get_history(self, date_guesser): if tr.find('th') is not None or len(cols) < 3: continue - t = Transaction(i) + t = Transaction() col_text = cols[self.COL_TEXT] if len(col_text.xpath('.//br')) == 0: @@ -509,7 +508,6 @@ def get_history(self, date_guesser): t.set_amount(credit, debit) yield t - i += 1 class MarketPage(BasePage): diff --git a/modules/creditcooperatif/perso/pages.py b/modules/creditcooperatif/perso/pages.py index ae41afaba8453defe9b46ceac430021583256adc..f4d288556571e0032e8fc96318543597261f31c7 100644 --- a/modules/creditcooperatif/perso/pages.py +++ b/modules/creditcooperatif/perso/pages.py @@ -114,7 +114,7 @@ class TransactionsJSONPage(LoggedPage, JsonPage): def get_transactions(self): seen = set() for tr in self.doc['exportData'][1:]: - t = Transaction(0) + t = Transaction() t.parse(tr[self.ROW_DATE], tr[self.ROW_TEXT]) t.set_amount(tr[self.ROW_CREDIT], tr[self.ROW_DEBIT]) t.id = t.unique_id(seen) @@ -145,7 +145,7 @@ def get_transactions(self): break for tr in data: - t = Transaction(0) + t = Transaction() t.parse(tr[self.ROW_DATE], tr[self.ROW_TEXT]) t.set_amount(tr[self.ROW_CREDIT], tr[self.ROW_DEBIT]) yield t diff --git a/modules/creditcooperatif/pro/pages.py b/modules/creditcooperatif/pro/pages.py index fd5f0744ec6c4f07534261b480375f756f0d7c92..cd22370ef28c2e81066337992e7bc15ff56d3b6e 100644 --- a/modules/creditcooperatif/pro/pages.py +++ b/modules/creditcooperatif/pro/pages.py @@ -131,7 +131,7 @@ def get_content(td): debit = get_content(tds[self.TR_DEBIT]) credit = get_content(tds[self.TR_CREDIT]) - t = Transaction(date+""+raw) + t = Transaction() t.parse(date, re.sub(r'[ ]+', ' ', raw)) t.set_amount(credit, debit) @@ -176,7 +176,7 @@ def get_content(td): else: date += "/%d" % time.localtime().tm_year - t = Transaction(date+""+raw) + t = Transaction() t.parse(date, re.sub(r'[ ]+', ' ', raw)) t.set_amount("", debit) diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index c4ed311772016b05ccb5268c48fdd92c020daf6a..990f0f24d70117b74210623475a0e41c4376c138 100755 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -492,7 +492,7 @@ def parse_transactions(self): def get_history(self): for i, tr in self.parse_transactions(): - t = Transaction(i) + t = Transaction() date = tr['date'] raw = self.parser.strip('

%s

' % (' '.join([tr['typeope'], tr['LibComp']]))) t.parse(date, raw) diff --git a/modules/societegenerale/pages/accounts_list.py b/modules/societegenerale/pages/accounts_list.py index 33121596282358d475ca00177ee1807cbd74c3b3..39af847a14a04e3a930ccedf121734b107f3b071 100644 --- a/modules/societegenerale/pages/accounts_list.py +++ b/modules/societegenerale/pages/accounts_list.py @@ -223,7 +223,7 @@ def _iter_transactions(self, doc): if not t: continue - t = Transaction(i) + t = Transaction() if 'EnTraitement' in tr.get('class', ''): t._coming = True diff --git a/modules/societegenerale/sgpe/pages.py b/modules/societegenerale/sgpe/pages.py index f9e6690418ebc6b22c2e74264d9d2c53d0b17938..ffba23dfc69a851bbcd2b6a528f7d75dbe50148f 100644 --- a/modules/societegenerale/sgpe/pages.py +++ b/modules/societegenerale/sgpe/pages.py @@ -209,7 +209,7 @@ def iter_transactions(self, account, basecount): tdamount = tddebit or tdcredit # not sure it has empty rows like AccountsPage, but check anyway if all((tddate, tdlabel, tdamount)): - t = Transaction(i) + t = Transaction() t.set_amount(tdamount) date = datetime.strptime(tddate, '%d/%m/%Y') val = datetime.strptime(tdval, '%d/%m/%Y') @@ -248,7 +248,7 @@ def iter_transactions(self): if len(date) == 0: continue - t = Transaction(i) + t = Transaction() t.parse(date, raw) t.set_amount(amount) yield t