bourso new investment page and fix parsing

This commit is contained in:
Baptiste Delpey 2015-06-22 11:45:09 +02:00 committed by Romain Bignon
commit 3bec12cd25
2 changed files with 2 additions and 1 deletions

View file

@ -55,6 +55,7 @@ class Boursorama(StateBrowser):
r'.*/date_anniversaire.phtml.*': UpdateInfoPage,
r'.*/detail.phtml.*': AccountLifeInsurance,
r'.*/opcvm.phtml.*': InvestmentDetail,
r'.*/bourse/trackers/etf.phtml.*': InvestmentDetail,
r'.*/positions_engagements.phtml.*': AccountMarket,
}

View file

@ -122,7 +122,7 @@ class AccountLifeInsurance(IsinMixin, Page):
class InvestmentDetail(IsinMixin, Page):
_re_isin = re.compile('(\w+)')
_isin = XPath('//h2[@class and contains(concat(" ", normalize-space(@class), " "), " fv-isin ")]')
_description = XPath('//p[@class="taj"]')
_description = XPath('//p[@class="taj"] | //div[@class="taj"]')
def get_investment_detail(self, inv):
subtitle = el_to_string(self._isin(self.document)[0])