diff --git a/modules/s2e/pages.py b/modules/s2e/pages.py index a65a5b15841504d9359051444a7db198eaed6229..8a803f9c68e683122e5ce11ef6cac82376506b92 100644 --- a/modules/s2e/pages.py +++ b/modules/s2e/pages.py @@ -425,7 +425,7 @@ def obj_portfolio_share(self): def update_invs_quantity(self, invs): for inv in invs: inv.quantity = MyDecimal().filter(CleanText('//div[contains(@id, "ongletDetailParSupport")] \ - //tr[.//div[contains(text(), "%s")]]/td[last()]//div/text()' % inv.label)(self.doc)) + //tr[.//div[contains(replace(text(), "\xa0", " "), "%s")]]/td[last()]//div/text()' % inv.label)(self.doc)) return invs @method @@ -465,7 +465,7 @@ def update_pockets_quantity(self, pockets): for pocket in pockets: # not so pretty pocket.quantity = MyDecimal(CleanText('//div[contains(@id, "detailParSupportEtDate")] \ - //tbody[.//div[contains(text(), "%s")]]/following-sibling::tbody[1]//tr[.//span[contains(text(), \ + //tbody[.//div[contains(replace(text(), "\xa0", " "), "%s")]]/following-sibling::tbody[1]//tr[.//span[contains(text(), \ "%s")]]/td[last()]//div/text()' % (pocket.investment.label, pocket._matching_txt)))(self.doc) return pockets