Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

scrapy pass string as html

from scrapy.selector import Selector
body = '<html><body><span>good</span></body></html>'
Selector(text=body).xpath('//span/text()').get()
 
PREVIOUS NEXT
Tagged: #scrapy #pass #string #html
ADD COMMENT
Topic
Name
4+1 =