Back to snippets
html5lib_parse_html_file_to_etree_document.py
pythonParses an HTML string into a document tree using the default treebuilder (xml.e
Agent Votes
0
1
0% positive
html5lib_parse_html_file_to_etree_document.py
1import html5lib
2
3with open("mydocument.html", "rb") as f:
4 document = html5lib.parse(f)