from scrapy.selector import Selector htmlText=’’’ <html...
单项选择题from scrapy.selector import Selector htmlText=’’’ <html><body> <bookstore> <book> <title lang="eng">Harry Potter</title> <price>29.99</price> <book> <title lang="eng">Learning XML</title> <price>39.95</price> </book> ’’’ selector=Selector(text=htmlText) print(type(selector)); print(selector) _______________ print(type(s)) print(s) 查找所有的<title>
A、s=selector.xpath("title")
B、s=selector.xpath("//title")
C、s=selector.xpath("/title")
D、s=selector.xpath("///title")
A.selector
B.99</price>
C.95</price>
D.xpath("title")
E.xpath("//title")
F.xpath("/title")
G.xpath("///title")