I'm using scrapy, and I'm trying to look for a span that contains a specific text. I have:
response.selector.xpath('//*[@class="ParamText"]/span/node()')
which returns:
<Selector xpath='//*[@class="ParamText"]/span/text()' data=u' MILES STODOLINK'>,
<Selector xpath='//*[@class="ParamText"]/span/text()' data=u'C'>,
<Selector xpath='//*[@class="ParamText"]/span/text()' data=u' MILES STODOLINK'>]
However when I run:
>>> response.selector.xpath('//*[@class="ParamText"]/span[contains(text(),"STODOLINK")]')
Out[11]: []
Why does the contains function not work?