handle investment pages even if they aren't implemented yet
This commit is contained in:
parent
2ab2e68cc4
commit
251eaef0c7
2 changed files with 12 additions and 7 deletions
|
|
@ -25,7 +25,7 @@ from dateutil.relativedelta import relativedelta
|
||||||
from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
|
from weboob.deprecated.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages.login import LoginPage
|
from .pages.login import LoginPage
|
||||||
from .pages.accounts_list import GlobalAccountsList, AccountsList, AccountHistoryPage
|
from .pages.accounts_list import GlobalAccountsList, AccountsList, AccountHistoryPage, InvestmentHistoryPage
|
||||||
|
|
||||||
__all__ = ['Fortuneo']
|
__all__ = ['Fortuneo']
|
||||||
|
|
||||||
|
|
@ -45,7 +45,8 @@ class Fortuneo(Browser):
|
||||||
|
|
||||||
'.*/prive/mes-comptes/livret/consulter-situation/consulter-solde\.jsp.*' : AccountHistoryPage,
|
'.*/prive/mes-comptes/livret/consulter-situation/consulter-solde\.jsp.*' : AccountHistoryPage,
|
||||||
'.*/prive/mes-comptes/compte-courant/consulter-situation/consulter-solde\.jsp.*' : AccountHistoryPage,
|
'.*/prive/mes-comptes/compte-courant/consulter-situation/consulter-solde\.jsp.*' : AccountHistoryPage,
|
||||||
|
'.*/prive/mes-comptes/compte-titres-.*': InvestmentHistoryPage,
|
||||||
|
'.*/prive/mes-comptes/assurance-vie.*': InvestmentHistoryPage,
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
@ -85,11 +86,12 @@ class Fortuneo(Browser):
|
||||||
def get_history(self, account):
|
def get_history(self, account):
|
||||||
self.location(account._link_id)
|
self.location(account._link_id)
|
||||||
|
|
||||||
self.select_form(name='ConsultationHistoriqueOperationsForm')
|
if self.is_on_page(AccountHistoryPage):
|
||||||
self.set_all_readonly(False)
|
self.select_form(name='ConsultationHistoriqueOperationsForm')
|
||||||
self['dateRechercheDebut'] = (date.today() - relativedelta(years=1)).strftime('%d/%m/%Y')
|
self.set_all_readonly(False)
|
||||||
self['nbrEltsParPage'] = '100'
|
self['dateRechercheDebut'] = (date.today() - relativedelta(years=1)).strftime('%d/%m/%Y')
|
||||||
self.submit()
|
self['nbrEltsParPage'] = '100'
|
||||||
|
self.submit()
|
||||||
|
|
||||||
return self.page.get_operations(account)
|
return self.page.get_operations(account)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,9 @@ class Transaction(FrenchTransaction):
|
||||||
(re.compile('^(?P<category>REMISE CHEQUES)(?P<text>.*)'), FrenchTransaction.TYPE_DEPOSIT),
|
(re.compile('^(?P<category>REMISE CHEQUES)(?P<text>.*)'), FrenchTransaction.TYPE_DEPOSIT),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class InvestmentHistoryPage(Page):
|
||||||
|
def get_operations(self, _id):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
class AccountHistoryPage(Page):
|
class AccountHistoryPage(Page):
|
||||||
def get_operations(self, _id):
|
def get_operations(self, _id):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue