def obj_photos(self): photos = [] for img in Dict('characteristics/images')(self): m = re.search('http://thbr\.figarocms\.net.*(http://.*)', img.get('xl')) if m: photos.append(HousingPhoto(m.group(1))) else: photos.append(HousingPhoto(img.get('xl'))) return photos
def obj_photos(self): photos = [] for photo in Dict('photoList')(self): photos.append(HousingPhoto(photo['fullscreenUrl'])) return photos
def obj_photos(self): photos = [] for photo in self.xpath('//div[has-class("OfferSlider")]//img'): photo_url = Attr('.', 'src')(photo) photo_url = photo_url.replace('640/480', '800/600') photos.append(HousingPhoto(photo_url)) return photos
def obj_photos(self): photos = [] for img in XPath('./a/img/@src')(self): if (img.endswith("visuel-nophoto.png") or img.endswith('miniature-video.png')): continue photos.append(HousingPhoto(u'%s' % img)) return photos
def obj_photos(self): photos = [] for img in XPath('//ul[@class="thumbsContainer"]//img/@src')(self): if img.endswith('.svg'): continue url = u'%s' % img.replace('182x136', '800x600') url = urljoin(self.page.url, url) # Ensure URL is absolute photos.append(HousingPhoto(url)) return photos
def obj_photos(self): url = CleanText( Attr('.//a[has-class("TeaserOffer-ill")]/img', 'src'))(self) # If the used photo is a default no photo, the src is on the same domain. if url[0] == '/': return [] else: return [HousingPhoto(url)]
def obj_photos(self): url = CleanText('./div[has-class("default-img")]/img/@data-src')(self) if url: url = unquote(url) if "http://" in url[3:]: rindex = url.rfind("?") if rindex == -1: rindex = None url = url[url.find("http://", 3):rindex] return [HousingPhoto(url)] else: return NotLoaded
def obj_photos(self): photos = [] url = None try: url = Attr( './/div[has-class("offer-picture")]//img', 'src' )(self) except: pass if url: url = url.replace('335x253', '800x600') url = urljoin(self.page.url, url) # Ensure URL is absolute photos.append(HousingPhoto(url)) return photos
def obj_photos(self): photos = [] for photo in Dict('photos')(self): photos.append(HousingPhoto(photo)) return photos
def obj_photos(self): photos = [] for img in XPath('//div[@class="owl-thumbs"]/a/img/@src')(self): if not img.endswith('miniature-video.png'): photos.append(HousingPhoto(u'%s' % img)) return photos
def obj_photos(self): photos = [] for img in XPath('//a[@class="thumbnail-link"]/img[@itemprop="image"]')(self): url = Regexp(CleanText('./@src'), r'http://thbr\.figarocms\.net.*(http://.*)')(img) photos.append(HousingPhoto(url)) return photos
def obj_photos(self): photos = [] for img in Dict('images/urls_large', default=[])(self): photos.append(HousingPhoto(img)) return photos