From 347cc81ac3c7551ea811fa7b9584a1803c4f3b56 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 28 Mar 2012 14:20:10 +0200 Subject: [PATCH] Fix homepage parsing --- modules/freemobile/pages/homepage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/freemobile/pages/homepage.py b/modules/freemobile/pages/homepage.py index d9c2c01f..c210cccf 100644 --- a/modules/freemobile/pages/homepage.py +++ b/modules/freemobile/pages/homepage.py @@ -30,12 +30,12 @@ class HomePage(BasePage): def get_list(self): l = [] - divabo = self.document.xpath('//div[@class="idAbonne"]')[0] + divabo = self.document.xpath('//div[@class="idAbonne pointer"]')[0] owner = divabo.xpath('p')[0].text.replace(' - ', '') phone = divabo.xpath('p/span')[0].text self.browser.logger.debug('Found ' + owner + ' has subscriber') self.browser.logger.debug('Found ' + phone + ' has phone number') - phoneplan = self.document.xpath('//div[@class="forfaitChoisi"]')[0].text + phoneplan = self.document.xpath('//div[@class="forfaitChoisi"]')[0].text.lstrip().rstrip() self.browser.logger.debug('Found ' + phoneplan + ' has subscription type') subscription = Subscription(phone)