• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2HTML parsing library based on the WHATWG "HTML5"
3specification. The parser is designed to be compatible with existing
4HTML found in the wild and implements well-defined error recovery that
5is largely compatible with modern desktop web browsers.
6
7Example usage:
8
9import html5lib
10f = open("my_document.html")
11tree = html5lib.parse(f)
12"""
13
14from __future__ import absolute_import, division, unicode_literals
15
16from .html5parser import HTMLParser, parse, parseFragment
17from .treebuilders import getTreeBuilder
18from .treewalkers import getTreeWalker
19from .serializer import serialize
20
21__all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
22           "getTreeWalker", "serialize"]
23
24# this has to be at the top level, see how setup.py parses this
25__version__ = "0.9999999-dev"
26