From 7988738e9a85b64ffc36aa7d50902a32e31676ab Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 1 Mar 2013 15:50:05 +0100 Subject: [PATCH] Fix nat->inter voice parsing --- modules/freemobile/pages/history.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/freemobile/pages/history.py b/modules/freemobile/pages/history.py index d12a8338..9d5c3403 100644 --- a/modules/freemobile/pages/history.py +++ b/modules/freemobile/pages/history.py @@ -107,13 +107,14 @@ class DetailsPage(BasePage): def parse_voice(self, div, string, num, inter=False): voice = Detail() voice.id = "-voice" + voicediv = div.xpath('div[@class="conso"]')[0] voice.label = unicode(div.find('div[@class="titre"]/p').text_content()) if inter: voice.label = voice.label + " (international)" voice.id = voice.id + "-inter" voice.price = convert_price(div) - voice1 = div.xpath('div[@class="conso"]/p/span')[0].text - voice2 = div.xpath('div[@class="conso"]/p/span')[1].text + voice1 = voicediv.xpath('.//span[@class="actif"]')[0].text + voice2 = voicediv.xpath('.//span[@class="actif"]')[1].text voice.infos = unicode(string) % (voice1, voice2) return voice