Issue
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 ?
Solution
you can try using xpath[contains()]
I have tested that this works:
response.xpath("//div[contains(@class,'woocommerce-product-gallery__image')]/a/@href").getall()
Answered By - alexpdev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.