diff --git a/modules/bnporc/browser.py b/modules/bnporc/browser.py index 2fa42f40..7fe17c0b 100644 --- a/modules/bnporc/browser.py +++ b/modules/bnporc/browser.py @@ -191,9 +191,26 @@ class BNPorc(BaseBrowser): if not self.is_on_page(AccountsList): self.location('/NSFR?Action=DSP_VGLOBALE') - execution = self.page.get_execution_id() - self.location('/banque/portail/particulier/FicheA?externalIAId=IAStatements&contractId=%d&pastOrPendingOperations=2&pageId=mouvementsavenir&_flowExecutionKey=%s' % (int(id), execution)) - return self.page.iter_operations() + + execution = self.page.document.xpath('//form[@name="goToApplication"]/input[@name="execution"]')[0].attrib['value'] + data = {'gt': 'homepage:basic-theme', + 'externalIAId': 'IAStatements', + 'cboFlowName': 'flow/iastatement', + 'contractId': id, + 'groupId': '-2', + 'pastOrPendingOperations': 2, + 'groupSelected':'-2', + 'step': 'STAMENTS', + 'pageId': 'mouvementsavenir', + #'operationsPerPage': 100, + #'_eventId': 'changeOperationsPerPage', + 'sendEUD': 'true', + 'execution': execution, + } + + self.location('https://www.secure.bnpparibas.net/banque/portail/particulier/FicheA', urllib.urlencode(data)) + + return self.page.iter_coming_operations() @check_expired_password def get_transfer_accounts(self): diff --git a/modules/bnporc/pages/transactions.py b/modules/bnporc/pages/transactions.py index d205d48d..1b5fcbaa 100644 --- a/modules/bnporc/pages/transactions.py +++ b/modules/bnporc/pages/transactions.py @@ -62,8 +62,7 @@ class AccountHistory(BasePage): yield op -class AccountComing(BasePage): - def iter_operations(self): + def iter_coming_operations(self): i = 0 for tr in self.document.xpath('//table[@id="tableauOperations"]//tr'): if 'typeop' in tr.attrib: @@ -83,3 +82,7 @@ class AccountComing(BasePage): raw=text) operation.set_amount(tds[2].text) yield operation + + +class AccountComing(AccountHistory): + pass