I want to extract product images using scrapy from this link
Here is my code
'img': response.css('figure.woocommerce-product-gallery__image a::attr("href")').getall(),
But it return empty. How to get all the images with comma seprated using scrapy ?
CodePudding user response:
you can try using xpath[contains()]
I have tested that this works:
response.xpath("//div[contains(@class,'woocommerce-product-gallery__image')]/a/@href").getall()