Try to use a selector on scrapy shell to extract information from a web page and didn't work proprely. I believe that it happened because exist white space into class name. Any idea what's going wrong?
I tried different syntaxes like:
response.xpath('//p[@class="text-nnowrap hidden-xs"]').getall()
response.xpath('//p[@class="text-nnowrap hidden-xs"]/text()').get()
# what I type into my scrapy shell
response.css('div.offer-item-details').xpath('//p[@class="text-nowrap hidden-xs"]/text()').get()
# html code that I need to extract:
<p class="text-nowrap hidden-xs">Apartamento para arrendar: Olivais, Lisboa</p>
expected result: Apartamento para arrendar: Olivais, Lisboa
actual result: []
had two classes: text-nowrap and hidden-xs. That might help you further debugging the problem. A quick search by myself led me to the following solution, didn't test it myself: https://stackoverflow.com/a/3881148/6511985
– Stephan Schrijver May 16 '19 at 17:20