Srcape all images (from slider)

Hi,

I need to scrape property images from kyero.com, for example:
https://www.kyero.com/en/property/6352431-apartment-for-sale-fuengirola
https://www.kyero.com/en/property/6352429-apartment-for-sale-fuengirola
To scrape first image I use:
{"id":"image01","type":"SelectorImage","parentSelectors":["link"],"selector":".tns-slide-active img","multiple":false,"delay":0}
and there is some slider so, I have no idea how to scrape next images like image02, image03, ... (by creating multiple selectors - Image 1, Image 2, Image 3,... and select each of the image separately - to have all of them in one row but separated columns)

For testing purposes I use this:
{"id":"images-grouped-2","type":"SelectorGroup","parentSelectors":["link"],"selector":".property-gallery__image","delay":0,"extractAttribute":"src"}
{"id":"images-grouped","type":"SelectorGroup","parentSelectors":["link"],"selector":".property-gallery__slide-wrapper > img","delay":0,"extractAttribute":"src"}
but it downloads only first 3 or 4 images (?)

Sitemap:
{"_id":"en-kyero-spain-sale","startUrl":["https://www.kyero.com/en/sitemap"],"selectors":[{"id":"link","type":"SelectorLink","parentSelectors":["categories"],"selector":".properties-list a","multiple":true,"delay":0},{"id":"name-and-price","type":"SelectorText","parentSelectors":["link"],"selector":"span.property-header__property-name","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":["link"],"selector":".property-header__property-name span","multiple":false,"regex":"","delay":0},{"id":"bedrooms","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(1) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"bathrooms","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(2) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"build-size","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(3) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"description","type":"SelectorText","parentSelectors":["link"],"selector":".property-description div:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"quality","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('quality') td.table-value","multiple":false,"regex":"","delay":0},{"id":"location","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('location') td.table-value","multiple":false,"regex":"","delay":0},{"id":"rooms","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('rooms') td.table-value","multiple":false,"regex":"","delay":0},{"id":"kitchen","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('kitchen') td.table-value","multiple":false,"regex":"","delay":0},{"id":"bathroom","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('bathroom') td.table-value","multiple":false,"regex":"","delay":0},{"id":"heating","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('heating') td.table-value","multiple":false,"regex":"","delay":0},{"id":"views","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('views') td.table-value","multiple":false,"regex":"","delay":0},{"id":"new-build","type":"SelectorHTML","parentSelectors":["link"],"selector":"tr:contains('New build') td.table-value","multiple":false,"regex":"","delay":0},{"id":"outside","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('outside') td.table-value","multiple":false,"regex":"","delay":0},{"id":"oher","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('other') td.table-value","multiple":false,"regex":"","delay":0},{"id":"plot-size","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('Plot size') td.table-value","multiple":false,"regex":"","delay":0},{"id":"parking","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('parking') td.table-value","multiple":false,"regex":"","delay":0},{"id":"pool","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('pool') td.table-value","multiple":false,"regex":"","delay":0},{"id":"security","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('security') td.table-value","multiple":false,"regex":"","delay":0},{"id":"leisure","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('leisure') td.table-value","multiple":false,"regex":"","delay":0},{"id":"tenure","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('tenure') td.table-value","multiple":false,"regex":"","delay":0},{"id":"ref","type":"SelectorText","parentSelectors":["link"],"selector":".property__sidebar span.ref-number","multiple":false,"regex":"","delay":0},{"id":"agency","type":"SelectorText","parentSelectors":["link"],"selector":"p.enquiry-form-agent__name","multiple":false,"regex":"","delay":0},{"id":"agency-logo","type":"SelectorImage","parentSelectors":["link"],"selector":"img.enquiry-form-agent__logo","multiple":false,"delay":0},{"id":"agency-link","type":"SelectorLink","parentSelectors":["link"],"selector":"a.section--horizontal","multiple":false,"delay":0},{"id":"image01","type":"SelectorImage","parentSelectors":["link"],"selector":".tns-slide-active img","multiple":false,"delay":0},{"id":"img-alt-full-descritpion","type":"SelectorHTML","parentSelectors":["link"],"selector":".tns-slide-active div.property-gallery__slide-wrapper","multiple":false,"regex":"","delay":0},{"id":"images-grouped","type":"SelectorGroup","parentSelectors":["link"],"selector":".property-gallery__slide-wrapper > img","delay":0,"extractAttribute":"src"},{"id":"utilities","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('utilities') td.table-value","multiple":false,"regex":"","delay":0},{"id":"garden","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('garden') td.table-value","multiple":false,"regex":"","delay":0},{"id":"images-grouped-2","type":"SelectorGroup","parentSelectors":["link"],"selector":".property-gallery__image","delay":0,"extractAttribute":"src"},{"id":"pool-on-top","type":"SelectorHTML","parentSelectors":["link"],"selector":"li:nth-of-type(3) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"build-size-2","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(4) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"categories","type":"SelectorLink","parentSelectors":["regions"],"selector":"div:nth-of-type(1) .col-xs-12 li a","multiple":true,"delay":0},{"id":"regions","type":"SelectorLink","parentSelectors":["_root"],"selector":".container-fluid > ul:nth-of-type(1) a","multiple":true,"delay":0}]}

Any help - would be greatly appreciated
Thank you

Regards,
Radek

You can use the Element Attribute selector to scrape the images with the selector '.property-gallery__slide:nth-of-type(1) .property-gallery__slide-wrapper img' and use 'data-src' as attribute name for image 1, '.property-gallery__slide:nth-of-type(2) .property-gallery__slide-wrapper img' with the same attribute name for image 2 and so on. Basically the same selector for all images whiles changing the 'nth-of-type' number for each of the images. I have added the first couple of them for you in the sitemap, now you need to do the rest:

{"_id":"en-kyero-spain-sale","startUrl":["https://www.kyero.com/en/sitemap"],"selectors":[{"id":"link","type":"SelectorLink","parentSelectors":["categories"],"selector":".properties-list a","multiple":true,"delay":0},{"id":"name-and-price","type":"SelectorText","parentSelectors":["link"],"selector":"span.property-header__property-name","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":["link"],"selector":".property-header__property-name span","multiple":false,"regex":"","delay":0},{"id":"bedrooms","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(1) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"bathrooms","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(2) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"build-size","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(3) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"description","type":"SelectorText","parentSelectors":["link"],"selector":".property-description div:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"quality","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('quality') td.table-value","multiple":false,"regex":"","delay":0},{"id":"location","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('location') td.table-value","multiple":false,"regex":"","delay":0},{"id":"rooms","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('rooms') td.table-value","multiple":false,"regex":"","delay":0},{"id":"kitchen","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('kitchen') td.table-value","multiple":false,"regex":"","delay":0},{"id":"bathroom","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('bathroom') td.table-value","multiple":false,"regex":"","delay":0},{"id":"heating","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('heating') td.table-value","multiple":false,"regex":"","delay":0},{"id":"views","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('views') td.table-value","multiple":false,"regex":"","delay":0},{"id":"new-build","type":"SelectorHTML","parentSelectors":["link"],"selector":"tr:contains('New build') td.table-value","multiple":false,"regex":"","delay":0},{"id":"outside","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('outside') td.table-value","multiple":false,"regex":"","delay":0},{"id":"oher","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('other') td.table-value","multiple":false,"regex":"","delay":0},{"id":"plot-size","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('Plot size') td.table-value","multiple":false,"regex":"","delay":0},{"id":"parking","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('parking') td.table-value","multiple":false,"regex":"","delay":0},{"id":"pool","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('pool') td.table-value","multiple":false,"regex":"","delay":0},{"id":"security","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('security') td.table-value","multiple":false,"regex":"","delay":0},{"id":"leisure","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('leisure') td.table-value","multiple":false,"regex":"","delay":0},{"id":"tenure","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('tenure') td.table-value","multiple":false,"regex":"","delay":0},{"id":"ref","type":"SelectorText","parentSelectors":["link"],"selector":".property__sidebar span.ref-number","multiple":false,"regex":"","delay":0},{"id":"agency","type":"SelectorText","parentSelectors":["link"],"selector":"p.enquiry-form-agent__name","multiple":false,"regex":"","delay":0},{"id":"agency-logo","type":"SelectorImage","parentSelectors":["link"],"selector":"img.enquiry-form-agent__logo","multiple":false,"delay":0},{"id":"agency-link","type":"SelectorLink","parentSelectors":["link"],"selector":"a.section--horizontal","multiple":false,"delay":0},{"id":"image01","type":"SelectorImage","parentSelectors":["link"],"selector":".tns-slide-active img","multiple":false,"delay":0},{"id":"img-alt-full-descritpion","type":"SelectorHTML","parentSelectors":["link"],"selector":".tns-slide-active div.property-gallery__slide-wrapper","multiple":false,"regex":"","delay":0},{"id":"images-grouped","type":"SelectorGroup","parentSelectors":["link"],"selector":".property-gallery__slide-wrapper > img","delay":0,"extractAttribute":"src"},{"id":"utilities","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('utilities') td.table-value","multiple":false,"regex":"","delay":0},{"id":"garden","type":"SelectorText","parentSelectors":["link"],"selector":"tr:contains('garden') td.table-value","multiple":false,"regex":"","delay":0},{"id":"images-grouped-2","type":"SelectorGroup","parentSelectors":["link"],"selector":".property-gallery__image","delay":0,"extractAttribute":"src"},{"id":"pool-on-top","type":"SelectorHTML","parentSelectors":["link"],"selector":"li:nth-of-type(3) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"build-size-2","type":"SelectorText","parentSelectors":["link"],"selector":"li:nth-of-type(4) span.characteristics__ch-number","multiple":false,"regex":"","delay":0},{"id":"categories","type":"SelectorLink","parentSelectors":["regions"],"selector":"div:nth-of-type(1) .col-xs-12 li a","multiple":true,"delay":0},{"id":"regions","type":"SelectorLink","parentSelectors":["_root"],"selector":".container-fluid > ul:nth-of-type(1) a","multiple":true,"delay":0},{"id":"image1","type":"SelectorElementAttribute","parentSelectors":["link"],"selector":".property-gallery__slide:nth-of-type(1) .property-gallery__slide-wrapper img","multiple":false,"extractAttribute":"data-src","delay":0},{"id":"image2","type":"SelectorElementAttribute","parentSelectors":["link"],"selector":".property-gallery__slide:nth-of-type(2) .property-gallery__slide-wrapper img","multiple":false,"extractAttribute":"data-src","delay":0},{"id":"image3","type":"SelectorElementAttribute","parentSelectors":["link"],"selector":".property-gallery__slide:nth-of-type(3) .property-gallery__slide-wrapper img","multiple":false,"extractAttribute":"data-src","delay":0}]}

1 Like

Hi Webber,

Thank you VERY much for this solution, I wouldn't solve it by my own. Now it works! Great :slight_smile:

Regards,
Radek

Hi guys , would really appreciate a video tutorial for this, as I have tried loads of times but always fail

1 Like