I have a raw html string that I want to convert to scrapy HTML response object so that I can use the selectors css and xpath, similar to scrapy\'s
css
xpath
alecxe's answer is right, but this is the correct way to instantiate a Selector from text in scrapy:
Selector
text
>>> from scrapy.selector import Selector >>> body = 'good' >>> Selector(text=body).xpath('//span/text()').get() 'good'