content=etree(tr_list[i]).xpath('//td[@class="pl20"]/span')[0].xpath('string(.)')???
1 回答
当年话下
TA贡献1890条经验 获得超9个赞
<span> <span>test</span> <span>.pdf</span></span>
from lxml import etree html = etree.parse('hello.html') result = html.xpath('//span/span/text()') print(result)
运行结果['test', '.pdf']
添加回答
举报
0/150
提交
取消