Commit a9f9c082 authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney) Committed by Vincent A

[logicimmo] Fix viager type detection

parent c729386c
Pipeline #1305 failed with stages
in 62 minutes and 4 seconds
......@@ -77,10 +77,11 @@ class HousingPage(HTMLPage):
else:
return POSTS_TYPES.RENT
elif 'vente' in url:
if(
'viager' in self.obj_text(self).lower()
and 'rente' in self.obj_text(self).lower()
):
offertype = Attr(
'//button[has-class("offer-contact-vertical-phone")][1]',
'data-offertransactiontype'
)(self)
if offertype == '4':
return POSTS_TYPES.VIAGER
else:
return POSTS_TYPES.SALE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment