support payment in several times
This commit is contained in:
parent
7344a22b0e
commit
33bbe6d451
2 changed files with 6 additions and 6 deletions
|
|
@ -79,7 +79,7 @@ class BredBrowser(BaseBrowser):
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def iter_transactions(self, id):
|
def iter_transactions(self, id, is_coming=None):
|
||||||
numero_compte, numero_poste = id.split('.')
|
numero_compte, numero_poste = id.split('.')
|
||||||
data = {'typeDemande': 'recherche',
|
data = {'typeDemande': 'recherche',
|
||||||
'motRecherche': '',
|
'motRecherche': '',
|
||||||
|
|
@ -94,7 +94,7 @@ class BredBrowser(BaseBrowser):
|
||||||
self.location('https://www.bred.fr/Andromede/Ecriture', urllib.urlencode(data))
|
self.location('https://www.bred.fr/Andromede/Ecriture', urllib.urlencode(data))
|
||||||
|
|
||||||
assert self.is_on_page(TransactionsPage)
|
assert self.is_on_page(TransactionsPage)
|
||||||
return self.page.get_history()
|
return self.page.get_history(is_coming)
|
||||||
|
|
||||||
def get_history(self, account):
|
def get_history(self, account):
|
||||||
for tr in self.iter_transactions(account.id):
|
for tr in self.iter_transactions(account.id):
|
||||||
|
|
@ -105,5 +105,5 @@ class BredBrowser(BaseBrowser):
|
||||||
|
|
||||||
def get_card_operations(self, account):
|
def get_card_operations(self, account):
|
||||||
for id in account._card_links:
|
for id in account._card_links:
|
||||||
for tr in self.iter_transactions(id):
|
for tr in self.iter_transactions(id, True):
|
||||||
yield tr
|
yield tr
|
||||||
|
|
|
||||||
|
|
@ -124,15 +124,15 @@ class Transaction(FrenchTransaction):
|
||||||
(re.compile('^REMISE (?P<text>.*)'), FrenchTransaction.TYPE_DEPOSIT),
|
(re.compile('^REMISE (?P<text>.*)'), FrenchTransaction.TYPE_DEPOSIT),
|
||||||
(re.compile('^(?P<text>.*)( \d+)? QUITTANCE .*'),
|
(re.compile('^(?P<text>.*)( \d+)? QUITTANCE .*'),
|
||||||
FrenchTransaction.TYPE_ORDER),
|
FrenchTransaction.TYPE_ORDER),
|
||||||
|
(re.compile('^CB PAIEM. EN \d+ FOIS \d+ (?P<text>.*?) LE .* LE (?P<dd>\d{2})/(?P<mm>\d{2})/(?P<yy>\d{2})$'),
|
||||||
|
FrenchTransaction.TYPE_CARD),
|
||||||
(re.compile('^.* LE (?P<dd>\d{2})/(?P<mm>\d{2})/(?P<yy>\d{2})$'),
|
(re.compile('^.* LE (?P<dd>\d{2})/(?P<mm>\d{2})/(?P<yy>\d{2})$'),
|
||||||
FrenchTransaction.TYPE_UNKNOWN),
|
FrenchTransaction.TYPE_UNKNOWN),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class TransactionsPage(BasePage):
|
class TransactionsPage(BasePage):
|
||||||
def get_history(self):
|
def get_history(self, is_coming=None):
|
||||||
is_coming = None
|
|
||||||
|
|
||||||
for tr in self.document.xpath('//div[@class="scrollTbody"]/table//tr'):
|
for tr in self.document.xpath('//div[@class="scrollTbody"]/table//tr'):
|
||||||
cols = tr.findall('td')
|
cols = tr.findall('td')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue