示例#1
0
文件: pages.py 项目: P4ncake/weboob
 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
示例#2
0
文件: pages.py 项目: guix77/weboob
 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
示例#3
0
文件: pages.py 项目: P4ncake/weboob
 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
示例#4
0
文件: pages.py 项目: guix77/weboob
 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