From 3bec12cd25a0c6a14c0f93d6cb132d4a170aa1c0 Mon Sep 17 00:00:00 2001 From: Baptiste Delpey Date: Mon, 22 Jun 2015 11:45:09 +0200 Subject: [PATCH] bourso new investment page and fix parsing --- modules/boursorama/browser.py | 1 + modules/boursorama/pages/investment.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index 06016378..49723f5b 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -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, } diff --git a/modules/boursorama/pages/investment.py b/modules/boursorama/pages/investment.py index 1823ce2d..f2c0c4c8 100644 --- a/modules/boursorama/pages/investment.py +++ b/modules/boursorama/pages/investment.py @@ -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])