Example #1
0
 def obj_house_type(self):
     prev_link = Link('//ol[has-class("breadcrumb")]/li[1]/a')(self)
     house_type = prev_link.split('-')[-1]
     if 'parking' in house_type:
         return HOUSE_TYPES.PARKING
     elif 'appartement' in house_type:
         return HOUSE_TYPES.APART
     elif 'terrain' in house_type:
         return HOUSE_TYPES.LAND
     elif 'maison' in house_type:
         return HOUSE_TYPES.HOUSE
     else:
         return HOUSE_TYPES.OTHER
Example #2
0
 def obj_house_type(self):
     item_link = Link('./div/a[@class="item-title"]')(self)
     house_type = item_link.split('/')[-1].split('-')[0]
     if 'parking' in house_type:
         return HOUSE_TYPES.PARKING
     elif 'appartement' in house_type:
         return HOUSE_TYPES.APART
     elif 'terrain' in house_type:
         return HOUSE_TYPES.LAND
     elif 'maison' in house_type:
         return HOUSE_TYPES.HOUSE
     else:
         return HOUSE_TYPES.OTHER
Example #3
0
 def obj_house_type(self):
     item_link = Link('./div/a[@class="item-title"]')(self)
     house_type = item_link.split('/')[-1].split('-')[0]
     if 'parking' in house_type:
         return HOUSE_TYPES.PARKING
     elif 'appartement' in house_type:
         return HOUSE_TYPES.APART
     elif 'terrain' in house_type:
         return HOUSE_TYPES.LAND
     elif 'maison' in house_type:
         return HOUSE_TYPES.HOUSE
     else:
         return HOUSE_TYPES.OTHER
Example #4
0
 def obj_house_type(self):
     prev_link = Link('//ol[has-class("breadcrumb")]/li[1]/a')(self)
     house_type = prev_link.split('-')[-1]
     if 'parking' in house_type:
         return HOUSE_TYPES.PARKING
     elif 'appartement' in house_type:
         return HOUSE_TYPES.APART
     elif 'terrain' in house_type:
         return HOUSE_TYPES.LAND
     elif 'maison' in house_type:
         return HOUSE_TYPES.HOUSE
     else:
         return HOUSE_TYPES.OTHER