we now skip message pages to get_investment on banquepopulaire
This commit is contained in:
parent
886b4bf204
commit
038a341f3a
2 changed files with 14 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ from weboob.deprecated.browser import Browser, BrowserIncorrectPassword, BrokenP
|
||||||
|
|
||||||
from .pages import LoginPage, IndexPage, AccountsPage, AccountsFullPage, CardsPage, TransactionsPage, \
|
from .pages import LoginPage, IndexPage, AccountsPage, AccountsFullPage, CardsPage, TransactionsPage, \
|
||||||
UnavailablePage, RedirectPage, HomePage, Login2Page, \
|
UnavailablePage, RedirectPage, HomePage, Login2Page, \
|
||||||
LineboursePage, NatixisPage, InvestmentNatixisPage, InvestmentLineboursePage
|
LineboursePage, NatixisPage, InvestmentNatixisPage, InvestmentLineboursePage, MessagePage
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['BanquePopulaire']
|
__all__ = ['BanquePopulaire']
|
||||||
|
|
@ -55,6 +55,7 @@ class BanquePopulaire(Browser):
|
||||||
'https://[^/]+/portailinternet/Transactionnel/Pages/CyberIntegrationPage.aspx': HomePage,
|
'https://[^/]+/portailinternet/Transactionnel/Pages/CyberIntegrationPage.aspx': HomePage,
|
||||||
'https://[^/]+/WebSSO_BP/_(?P<bankid>\d+)/index.html\?transactionID=(?P<transactionID>.*)': Login2Page,
|
'https://[^/]+/WebSSO_BP/_(?P<bankid>\d+)/index.html\?transactionID=(?P<transactionID>.*)': Login2Page,
|
||||||
'https://www.linebourse.fr/ReroutageSJR': LineboursePage,
|
'https://www.linebourse.fr/ReroutageSJR': LineboursePage,
|
||||||
|
'https://www.linebourse.fr/DetailMessage.*': MessagePage,
|
||||||
'https://www.linebourse.fr/Portefeuille': InvestmentLineboursePage,
|
'https://www.linebourse.fr/Portefeuille': InvestmentLineboursePage,
|
||||||
'https://www.assurances.natixis.fr/espaceinternet-bp/views/common.*': NatixisPage,
|
'https://www.assurances.natixis.fr/espaceinternet-bp/views/common.*': NatixisPage,
|
||||||
'https://www.assurances.natixis.fr/espaceinternet-bp/views/contrat.*': InvestmentNatixisPage,
|
'https://www.assurances.natixis.fr/espaceinternet-bp/views/contrat.*': InvestmentNatixisPage,
|
||||||
|
|
@ -193,6 +194,9 @@ class BanquePopulaire(Browser):
|
||||||
self.location(url, urllib.urlencode(params))
|
self.location(url, urllib.urlencode(params))
|
||||||
if self.is_on_page(LineboursePage):
|
if self.is_on_page(LineboursePage):
|
||||||
self.location('https://www.linebourse.fr/Portefeuille')
|
self.location('https://www.linebourse.fr/Portefeuille')
|
||||||
|
while self.is_on_page(MessagePage):
|
||||||
|
self.page.skip()
|
||||||
|
self.location('https://www.linebourse.fr/Portefeuille')
|
||||||
elif self.is_on_page(NatixisPage):
|
elif self.is_on_page(NatixisPage):
|
||||||
self.page.submit_form()
|
self.page.submit_form()
|
||||||
return self.page.get_investments()
|
return self.page.get_investments()
|
||||||
|
|
|
||||||
|
|
@ -710,3 +710,12 @@ class InvestmentNatixisPage(_BasePage):
|
||||||
if value == '-':
|
if value == '-':
|
||||||
return NotAvailable
|
return NotAvailable
|
||||||
return Decimal(Transaction.clean_amount(value))
|
return Decimal(Transaction.clean_amount(value))
|
||||||
|
|
||||||
|
class MessagePage(_BasePage):
|
||||||
|
def skip(self):
|
||||||
|
try:
|
||||||
|
self.browser.select_form(name="leForm")
|
||||||
|
except FormNotFoundError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
self.browser.submit(nologin=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue