module documentation

Compare two HTML documents.
Constant ASCII​_WHITESPACE Undocumented
Constant BOOLEAN​_ATTRIBUTES Undocumented
Class ​Element Undocumented
Class ​HTMLParse​Error Undocumented
Class ​Parser Undocumented
Class ​Root​Element Undocumented
Function normalize​_attributes Undocumented
Function normalize​_whitespace Undocumented
Function parse​_html No summary
ASCII_WHITESPACE =

Undocumented

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

Undocumented

Value
set(['allowfullscreen',
     'async',
     'autofocus',
     'autoplay',
     'checked',
     'controls',
     'default',
...
def normalize_attributes(attributes):

Undocumented

def normalize_whitespace(string):

Undocumented

def parse_html(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.