Fix homepage parsing
This commit is contained in:
parent
d390590363
commit
347cc81ac3
1 changed files with 2 additions and 2 deletions
|
|
@ -30,12 +30,12 @@ class HomePage(BasePage):
|
||||||
|
|
||||||
def get_list(self):
|
def get_list(self):
|
||||||
l = []
|
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(' - ', '')
|
owner = divabo.xpath('p')[0].text.replace(' - ', '')
|
||||||
phone = divabo.xpath('p/span')[0].text
|
phone = divabo.xpath('p/span')[0].text
|
||||||
self.browser.logger.debug('Found ' + owner + ' has subscriber')
|
self.browser.logger.debug('Found ' + owner + ' has subscriber')
|
||||||
self.browser.logger.debug('Found ' + phone + ' has phone number')
|
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')
|
self.browser.logger.debug('Found ' + phoneplan + ' has subscription type')
|
||||||
|
|
||||||
subscription = Subscription(phone)
|
subscription = Subscription(phone)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue