repo.or.cz
/
objavi2.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
change shfit_file in case of cross-file-system move
[objavi2.git]
/
tests
/
html5lib-vs-clean.py
blob
f04ee21760bf4e81da11f0c12195c893f73b83f2
1
#!/usr/bin/python
2
3
import
lxml
.
html
,
lxml
.
html
.
clean
4
from
lxml
.
html
import
html5parser
5
6
html
=
"""<html><body>
7
<!-- a comment -->
8
</body></html>
9
"""
10
11
#tree = lxml.html.document_fromstring(html)
12
tree
=
html5parser
.
document_fromstring
(
html
)
13
14
cleaner
=
lxml
.
html
.
clean
.
Cleaner
()
15
cleaner
(
tree
)
16