I am new to scrapy and I have to extract text from a tag with multiple class names, where the class names contain spaces and hyphens.
Example:
<div class="info">
<span class="price sale">text1</span>
<span class="title ng-binding">some text</span>
</div>
When i use the code:
response.xpath("//span[contains(@class,'price sale')]/text()").extract()
I am able to get text1 but when I use:
response.xpath("//span[contains(@class,'title ng-binding')]/text()").extract()
I get an empty list. Why is this happening and how to handle this?