Commit a724a456 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[societegenerale] email is now on HTMLProfilePage

scrap email on this page
parent 843fadd8
......@@ -34,7 +34,7 @@ from weboob.tools.value import Value, ValueBool
from .pages.accounts_list import (
AccountsMainPage, AccountDetailsPage, AccountsPage, LoansPage, HistoryPage,
CardHistoryPage, PeaLiquidityPage, AccountsSynthesesPage,
AdvisorPage, HTMLProfilePage, XMLProfilePage, CreditPage, CreditHistoryPage,
AdvisorPage, HTMLProfilePage, CreditPage, CreditHistoryPage,
MarketPage, LifeInsurance, LifeInsuranceHistory, LifeInsuranceInvest, LifeInsuranceInvest2,
UnavailableServicePage,
)
......@@ -89,7 +89,6 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
# Profile
advisor = URL(r'/icd/pon/data/get-contacts.xml', AdvisorPage)
html_profile_page = URL(r'/com/dcr-web/dcr/dcr-coordonnees.html', HTMLProfilePage)
xml_profile_page = URL(r'/gms/gmsRestituerAdresseNotificationServlet.xml', XMLProfilePage)
# Document
bank_statement = URL(r'/restitution/rce_derniers_releves.html', BankStatementPage)
......@@ -414,13 +413,11 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
@need_login
def get_profile(self):
self.html_profile_page.go()
profile = self.page.get_profile()
self.xml_profile_page.go()
profile.email = self.page.get_email()
return profile
return self.page.get_profile()
@need_login
def iter_subscription(self):
self.accounts_main_page.go()
try:
profile = self.get_profile()
subscriber = profile.name
......
......@@ -679,15 +679,11 @@ class HTMLProfilePage(LoggedPage, HTMLPage):
profile.address += ' ' + CleanText('//div[@id="dcr-conteneur"]//div[contains(text(), "ADRESSE")]/following::table//tr[5]/td[2]')(self.doc)
profile.address += ' ' + CleanText('//div[@id="dcr-conteneur"]//div[contains(text(), "ADRESSE")]/following::table//tr[6]/td[2]')(self.doc)
profile.country = CleanText('//div[@id="dcr-conteneur"]//div[contains(text(), "ADRESSE")]/following::table//tr[7]/td[2]')(self.doc)
profile.email = CleanText('//span[@id="currentEmail"]')(self.doc)
return profile
class XMLProfilePage(LoggedPage, XMLPage):
def get_email(self):
return CleanText('//AdresseEmailExterne')(self.doc)
class UnavailableServicePage(LoggedPage, HTMLPage):
def on_load(self):
if self.doc.xpath('//div[contains(@class, "erreur_404_content")]'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment