module documentation

Compare two HTML documents.

Class Element Undocumented
Class Parser Undocumented
Class RootElement Undocumented
Exception HTMLParseError Undocumented
Function normalize_attributes Undocumented
Function normalize_whitespace Undocumented
Function parse_html Take a string that contains HTML and turn it into a Python object structure that can be easily compared against other HTML on semantic equivalence. Syntactical differences like which quotation is used on arguments will be ignored.
Constant ASCII_WHITESPACE Undocumented
Constant BOOLEAN_ATTRIBUTES Undocumented
def normalize_attributes(attributes): (source)

Undocumented

def normalize_whitespace(string): (source)

Undocumented

def parse_html(html): (source)

Take a string that contains HTML and turn it into a Python object structure that can be easily compared against other HTML on semantic equivalence. Syntactical differences like which quotation is used on arguments will be ignored.

ASCII_WHITESPACE = (source)

Undocumented

Value
_lazy_re_compile('[\\t\\n\\f\\r ]+')
BOOLEAN_ATTRIBUTES: set[str] = (source)

Undocumented

Value
set(['allowfullscreen',
     'async',
     'autofocus',
     'autoplay',
     'checked',
     'controls',
     'default',
...