There is more than one div "acceuil_btn"
This commit is contained in:
parent
ef355e8d91
commit
66d8252362
1 changed files with 4 additions and 1 deletions
|
|
@ -30,7 +30,10 @@ class HomePage(BasePage):
|
|||
|
||||
def get_list(self):
|
||||
for divglobal in self.document.xpath('//div[@class="abonne"]'):
|
||||
login = divglobal.xpath('//div[@class="acceuil_btn"]/a')[0].attrib['href'].split('=').pop()
|
||||
for link in divglobal.xpath('//div[@class="acceuil_btn"]/a'):
|
||||
login = link.attrib['href'].split('=').pop()
|
||||
if login.isdigit():
|
||||
break
|
||||
divabo = divglobal.xpath('div[@class="idAbonne pointer"]')[0]
|
||||
owner = unicode(divabo.xpath('p')[0].text.replace(' - ', ''))
|
||||
phone = unicode(divabo.xpath('p/span')[0].text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue