From a75a853128289dab31bcdd8de7f2d7d06d857c0e Mon Sep 17 00:00:00 2001 From: smurail Date: Thu, 30 Apr 2015 12:21:18 +0200 Subject: [PATCH] handle corner case --- modules/bnporc/perso/investment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bnporc/perso/investment.py b/modules/bnporc/perso/investment.py index e634946b..57945c16 100644 --- a/modules/bnporc/perso/investment.py +++ b/modules/bnporc/perso/investment.py @@ -70,7 +70,8 @@ class AccountMarketInvestment(Page): class AccountLifeInsuranceInvestment(Page): def iter_investment(self): - rows = self.document.xpath('//table[@id="mefav_repartition_supports_BPF"]//tr') + rows = self.document.xpath('//table[@id="mefav_repartition_supports_BPF"]//tr') or \ + self.document.xpath('//tbody[@id="mefav_repartition_supports"]//tr') for tr in rows: cells = clean_cells(tr.findall('td')) cells[3:] = clean_amounts(cells[3:])