Example #1
0
 def obj_DPE(self):
     energy_value = CleanText(
         '//ul[@class="energyInfosDPE"]//li[@class="energyInfos"]/span/@data-class',
         default=""
     )(self)
     if len(energy_value):
         energy_value = energy_value.replace("DPE", "").strip()[0]
     return getattr(ENERGY_CLASS, energy_value, NotAvailable)
Example #2
0
 def obj_GES(self):
     greenhouse_value = CleanText(
         '//ul[@class="energyInfosGES"]//li[@class="energyInfos"]/span/@data-class',
         default=""
     )(self)
     if len(greenhouse_value):
         greenhouse_value = greenhouse_value.replace("GES", "").strip()[0]
     return getattr(ENERGY_CLASS, greenhouse_value, NotAvailable)
Example #3
0
 def obj_phone(self):
     phone = CleanText(
         '(//div[has-class("contact-proprietaire-box")]//strong[@class="tel-wrapper"])[1]'
     )(self)
     phone = phone.replace(' ', ', ')
     return phone