I am working in python to make crawlers with the help of Scrapy library. when i fetch data with selector response.xpath and response.css then it gives different result. like when i use xpath it does not show the result,if i replace the xpath
with css then it shows the result. please help me to understand this concept.
xpath query
img = response.xpath('//div[@class="product-images"]//img/@src').extract()
css query
img = response.css('div.product-images img::attr(src)').extract()
Thanks.
<div class="product-images relative mb-half has-hover woocommerce-product-gallery woocommerce-product-gallery--with-images woocommerce-product-gallery--columns-4 images">- Zia