from scrapy.selector import Selector htmlText=''' Harry Potter 29.99 学习 XML 39.95 ''' selector=Selector(text=htmlText) _____________________________________ print(s) print(s.extract()) for e in s: print(e.extract()) 程序结果: [ , ] ['Harry Potter', ' 学习 XML'] Harry Potter 学习 XML