2019-10-02 18:18:38 |
scoder |
description |
Python : sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)
lxml.etree : (4, 2, 5, 0)
libxml used : (2, 9, 8)
libxml compiled : (2, 9, 8)
libxslt used : (1, 1, 32)
libxslt compiled : (1, 1, 32) |
from lxml import etree, html
b = html.fromstring('<b attribute-1="1" attribute-2="2">Text</b>')
etree.strip_attributes(b, '*')
print(etree.tostring(b).decode())
Python : sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)
lxml.etree : (4, 2, 5, 0)
libxml used : (2, 9, 8)
libxml compiled : (2, 9, 8)
libxslt used : (1, 1, 32)
libxslt compiled : (1, 1, 32) |
|