fixing closed life insurance account on fortuneo
This commit is contained in:
parent
723c070150
commit
d8fecab254
2 changed files with 13 additions and 4 deletions
|
|
@ -90,9 +90,10 @@ class Fortuneo(Browser):
|
||||||
def get_history(self, account):
|
def get_history(self, account):
|
||||||
self.location(account._link_id)
|
self.location(account._link_id)
|
||||||
|
|
||||||
self.page.select_period()
|
if self.page.select_period():
|
||||||
|
return self.page.get_operations(account)
|
||||||
|
|
||||||
return self.page.get_operations(account)
|
return ([])
|
||||||
|
|
||||||
def get_accounts_list(self):
|
def get_accounts_list(self):
|
||||||
"""accounts list"""
|
"""accounts list"""
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ from time import sleep
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
|
|
||||||
|
from mechanize import FormNotFoundError
|
||||||
|
|
||||||
from weboob.capabilities.bank import Account, Investment
|
from weboob.capabilities.bank import Account, Investment
|
||||||
from weboob.deprecated.browser import Page, BrowserIncorrectPassword
|
from weboob.deprecated.browser import Page, BrowserIncorrectPassword
|
||||||
from weboob.capabilities import NotAvailable
|
from weboob.capabilities import NotAvailable
|
||||||
|
|
@ -91,7 +93,7 @@ class PeaHistoryPage(Page):
|
||||||
return Decimal(value)
|
return Decimal(value)
|
||||||
|
|
||||||
def select_period(self):
|
def select_period(self):
|
||||||
pass
|
return True
|
||||||
|
|
||||||
def get_operations(self, _id):
|
def get_operations(self, _id):
|
||||||
return iter([])
|
return iter([])
|
||||||
|
|
@ -132,11 +134,15 @@ class InvestmentHistoryPage(Page):
|
||||||
def select_period(self):
|
def select_period(self):
|
||||||
self.browser.location(self.url.replace('portefeuille-assurance-vie.jsp', 'operations/assurance-vie-operations.jsp'))
|
self.browser.location(self.url.replace('portefeuille-assurance-vie.jsp', 'operations/assurance-vie-operations.jsp'))
|
||||||
|
|
||||||
self.browser.select_form(name='OperationsForm')
|
try:
|
||||||
|
self.browser.select_form(name='OperationsForm')
|
||||||
|
except FormNotFoundError:
|
||||||
|
return False
|
||||||
self.browser.set_all_readonly(False)
|
self.browser.set_all_readonly(False)
|
||||||
self.browser['dateDebut'] = (date.today() - relativedelta(years=1)).strftime('%d/%m/%Y')
|
self.browser['dateDebut'] = (date.today() - relativedelta(years=1)).strftime('%d/%m/%Y')
|
||||||
self.browser['nbrEltsParPage'] = '100'
|
self.browser['nbrEltsParPage'] = '100'
|
||||||
self.browser.submit()
|
self.browser.submit()
|
||||||
|
return True
|
||||||
|
|
||||||
def get_operations(self, _id):
|
def get_operations(self, _id):
|
||||||
for tr in self.document.xpath('//table[@id="tableau_histo_opes"]/tbody/tr'):
|
for tr in self.document.xpath('//table[@id="tableau_histo_opes"]/tbody/tr'):
|
||||||
|
|
@ -160,6 +166,8 @@ class AccountHistoryPage(Page):
|
||||||
self.browser['nbrEltsParPage'] = '100'
|
self.browser['nbrEltsParPage'] = '100'
|
||||||
self.browser.submit()
|
self.browser.submit()
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_operations(self, _id):
|
def get_operations(self, _id):
|
||||||
"""history, see http://docs.weboob.org/api/capabilities/bank.html?highlight=transaction#weboob.capabilities.bank.Transaction"""
|
"""history, see http://docs.weboob.org/api/capabilities/bank.html?highlight=transaction#weboob.capabilities.bank.Transaction"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue