[leboncoin] get main photo when there is no carousel

This commit is contained in:
Bezleputh 2015-09-04 13:43:04 +02:00 committed by Florent
commit c28c42f140

View file

@ -176,4 +176,9 @@ class HousingPage(HTMLPage):
default='')(img)
if url:
photos.append(HousingPhoto(url))
if not photos:
img = self.el.xpath('//div[@class="lbcImages"]/meta/@content')
if img:
photos.append(HousingPhoto(img[0]))
return photos