Scraping multiple wp-image on different pages

I am trying to scrape a number of sites that all use Wordpress but I keep coming up to a problem from time-to-time which is that each page has a product image with a dedicated number attached to it.

For example img.wp-image-5522, img.wp-image-5523, img.wp-image-2571 and this is the same for each individual product.

Now when the scrape is started it just picks up that one image that was picked up by the selector.

How do I make sure that it selects the image from the product page that it is scraping?

This is one of the sites

You can use ElementAttribute to extract the value you need... Easy )

I tried ElementAttribute and src but it keeps referring to that specific image so it does not scrape any of the others that are needed

send your sitemap, will check what's wrong

thank you, much appreciated!

{"_id":"virto","startUrl":["https://www.virto.es/todos-los-productos/"],"selectors":[{"id":"cat","parentSelectors":["_root"],"type":"SelectorLink","selector":".products_list_item a","multiple":true,"linkType":"linkFromHref"},{"id":"prod","parentSelectors":["cat"],"type":"SelectorLink","selector":".products_list_item a","multiple":true,"linkType":"linkFromHref"},{"id":"style","parentSelectors":["prod"],"type":"SelectorLink","selector":".products_list_item a","multiple":true,"linkType":"linkFromHref"},{"id":"name","parentSelectors":["style"],"type":"SelectorText","selector":"h1","multiple":false,"regex":""}]}

here you go...

{"_id":"VIRTO","startUrl":["https://www.virto.es/todos-los-productos/"],"selectors":[{"id":"cat","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".products_list_item a","type":"SelectorLink"},{"id":"prod","linkType":"linkFromHref","multiple":true,"parentSelectors":["cat"],"selector":".products_list_item a","type":"SelectorLink"},{"id":"style","linkType":"linkFromHref","multiple":true,"parentSelectors":["prod"],"selector":".products_list_item a","type":"SelectorLink"},{"id":"name","multiple":false,"parentSelectors":["style"],"regex":"","selector":"h1","type":"SelectorText"},{"extractAttribute":"class","id":"id_","multiple":false,"parentSelectors":["style"],"selector":"div.et_pb_section_0 span[class*=\"image_wrap\"] img","type":"SelectorElementAttribute"}]}

Sorry, what I meant is that I cannot get the dedicated URL for each image on each product.

You wrote that you need only ID number from image class? Isn't it ?
You need a picture URL?

I think I did not write it properly but I meant the URL.

I can only scrape the image that is selected by the selector which shows the ID. However, I need the product image URLs to import the image to my site.

Am I right? You need picture URLs of sub-categories...


or exactly - picture of products?
image

URL of product pictures, like this for example https://www.virto.es/wp-content/uploads/2021/07/aceituna-negra-entera-1.jpg

try to add this selector:
image

You are a hero! Thank you that works :grinning:

Have a nice day ))))