4.5.4. lxml

4.5.4.1. 使用lxml将html文本内容转换成html对象

1from lxml import etree
2
3text = '''
4    <div>some html tag</div>
5'''
6
7html = etree.HTML(text)