dom.xpath("//title") dom.xpath("//title/text()") # text()将内容取出来 相对路径 dom.xpath("/html//title/text()") # 相对路径