标签:content htm bsp str ext pre color rip pat
content = etree.HTML(text) h = content.xpath(‘//h1‘) h1 = h[0].xpath(‘string(.)‘).strip()
Xpath提取一个标签里的所有文本
原文地址:https://www.cnblogs.com/hankleo/p/10394905.html