I am trying to get the price texts in
potterybarn in scrapy shell. I used scrapy shell "https://www.potterybarnkids.com/shop/easter/easter-shop-all-baskets/"
then trying to get the price inside span class="price-state price-sale"
is there a way to extract entire text inside span with going into each span inside it?
I tried
response.xpath('//span[@class="price-state price-sale"]/text()').extract()
also response.xpath('//span[@class="price-state price-sale"]//text()')[0].extract()
I need a way to extract all texts inside the selector weather it has inner spans,divs,...
I checked How can i extract only text in scrapy selector in python, also Scrapy extracting text from div in this one the answer assumes that it will contain only span children which will work in that example and this one. but is there a more general way to correctly extract all text inside children because //text()
isn't working.