(1)提取标签之间的内容:规则/text()
type(result)=
result = html.xpath('//div[@class="hd"]/span/text()')
(2)提取标签之间的超链接:'规则'
,不需要text()啦!!!
result_url_list = html.xpath('//div[@class="info"]//a/@href')
(1)提取标签之间的内容:规则/text()
type(result)=
result = html.xpath('//div[@class="hd"]/span/text()')
(2)提取标签之间的超链接:'规则'
,不需要text()啦!!!
result_url_list = html.xpath('//div[@class="info"]//a/@href')