From 53f430286cd532e5177f2faaa281e9e6b1d2e0fa Mon Sep 17 00:00:00 2001 From: Baptiste Delpey Date: Mon, 22 Jun 2015 14:29:47 +0200 Subject: [PATCH] oney change get_balance xpath --- modules/oney/pages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/oney/pages.py b/modules/oney/pages.py index 4819141f..743f9c57 100644 --- a/modules/oney/pages.py +++ b/modules/oney/pages.py @@ -121,7 +121,8 @@ class IndexPage(LoggedPage, HTMLPage): is_here = "//div[@id='situation']" def get_balance(self): - return -CleanDecimal('.', replace_dots=True)(self.doc.xpath('//div[@id = "total-sommes-dues"]/p[contains(text(), "sommes dues")]/span[@class = "montant"]')[0]) + return -CleanDecimal('.', replace_dots=True)(self.doc.xpath('//div[@class = "synthese-produit"]/p[@class = "somme-due"]/span[@class = "synthese-montant"] | \ + //div[@id = "total-sommes-dues"]/p[contains(text(), "sommes dues")]/span[@class = "montant"]')[0]) class OperationsPage(LoggedPage, HTMLPage):