1.提取属性值
response.xpath("//a/@href").get()
#get()方法等同于extract()[0],getall()方法等同于extract()
2.提取标签值
response.xpath("//a/text()").get()
3.提取段落所有文字
#获取a标签下的所有标签组
response.xpath("//a").get()
#去除标签,获得纯文本
response.xpath("string(//a)").get()
response.xpath("//a/@href").get()
#get()方法等同于extract()[0],getall()方法等同于extract()
response.xpath("//a/text()").get()
#获取a标签下的所有标签组
response.xpath("//a").get()
#去除标签,获得纯文本
response.xpath("string(//a)").get()