From 7430246c24151f6a79f0598f21602214c8b4a051 Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 25 Jan 2013 12:00:08 +0100 Subject: [PATCH] Get renew date on mutli accounts --- 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 ef2843ae..2752a592 100644 --- a/modules/freemobile/pages/history.py +++ b/modules/freemobile/pages/history.py @@ -124,8 +124,9 @@ class DetailsPage(BasePage): return self.datebills def get_renew_date(self, subscription): - div = self.document.xpath('//div[@class="resumeConso"]')[0] - mydate = div.xpath('span[@class="actif"]')[0].text + login = subscription._login + div = self.document.xpath('//div[@login="%s"]' % login)[0] + mydate = div.xpath('.//span[@class="actif"]')[0].text mydate = date(*reversed([int(x) for x in mydate.split("/")])) if mydate.month == 12: mydate = mydate.replace(month=1)