I wanna to use scrapy to fetch the img's links so i write the program below in scrapy's crawler:
hxs.select('//dl[@class="clearfix"]//img/@src/text()').extract()
However, it's doesn't work anyway. is there any problem ?
If you are using CSS selectors instead of XPath, the syntax is ::attr(src)
response.css('.product-list img::attr(src)').extract() # extract_first() to get only one
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With