html5libΒΆ

html5lib is a pure-python library for parsing HTML. It is designed to conform to the WHATWG HTML specification, as is implemented by all major web browsers.

More Info: https://github.com/html5lib/html5lib-python