support card and withdrawal transactions
This commit is contained in:
parent
fa3b0ee174
commit
8d23160f61
1 changed files with 4 additions and 6 deletions
|
|
@ -55,12 +55,10 @@ class LoginPage(BasePage):
|
|||
self.browser.submit(nologin=True)
|
||||
|
||||
class Transaction(FrenchTransaction):
|
||||
PATTERNS = [(re.compile('^RET DAB (?P<text>.*?) RETRAIT DU (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}).*'),
|
||||
FrenchTransaction.TYPE_WITHDRAWAL),
|
||||
(re.compile('^RET DAB (?P<text>.*?) CARTE ?:.*'),
|
||||
FrenchTransaction.TYPE_WITHDRAWAL),
|
||||
(re.compile('(\w+) (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}) CB:[^ ]+ (?P<text>.*)'),
|
||||
PATTERNS = [(re.compile('^CB (?P<text>.*?) FACT (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2})'),
|
||||
FrenchTransaction.TYPE_CARD),
|
||||
(re.compile('^RETRAIT DAB (?P<dd>\d+)-(?P<mm>\d+)-.*'),
|
||||
FranchTransaction.TYPE_WITHDRAWAL),
|
||||
(re.compile('^VIR(EMENT)? (?P<text>.*)'), FrenchTransaction.TYPE_TRANSFER),
|
||||
(re.compile('^PRLV (?P<text>.*)'), FrenchTransaction.TYPE_ORDER),
|
||||
(re.compile('^CHEQUE.*'), FrenchTransaction.TYPE_CHECK),
|
||||
|
|
@ -123,7 +121,7 @@ class IndexPage(BasePage):
|
|||
debit = u''.join([txt.strip() for txt in tds[-2].itertext()])
|
||||
credit = u''.join([txt.strip() for txt in tds[-1].itertext()])
|
||||
|
||||
t.parse(date, raw)
|
||||
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
||||
t.set_amount(credit, debit)
|
||||
yield t
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue