Fix freemobile for name with a dash

Always get the last element of the list
close #915
This commit is contained in:
Jean-Christophe Dubacq 2012-10-03 14:34:12 +02:00 committed by Romain Bignon
commit 289ad85ae4

View file

@ -45,7 +45,7 @@ class DetailsPage(BasePage):
self.datebills = []
for div in self.document.xpath('//div[@class="infosLigneDetail pointer"]'):
phonenumber = div.text
phonenumber = phonenumber.split("-")[2].strip()
phonenumber = phonenumber.split("-")[-1].strip()
virtualnumber = div.attrib['onclick'].split('(')[1][1]
self.details['num' + str(phonenumber)] = virtualnumber