Classes
ParserBackend
HTML parser backend identifiers.
ParserBackend
HTML parser backend identifiers.
ParserFactory
Factory for HTML parsers used in Bengal.
Currently returns NativeHTMLParser, which is optimized fo…
ParserFactory
Factory for HTML parsers used in Bengal.
Currently returns NativeHTMLParser, which is optimized for build-time validation and health checks. Replaced BeautifulSoup4 for performance (~5-10x faster for text extraction).
Methods 2
get_html_parser
staticmethod
Get HTML parser for build-time validation and health checks.
get_html_parser
staticmethod def get_html_parser(backend: str | None = None) -> Callable[..., Any]
Get HTML parser for build-time validation and health checks.
Parameters 1
backend |
str | None |
Parser backend (currently only 'native' supported) |
Returns
Parser callable that returns NativeHTMLParser instanceCallable[..., Any]
—
get_parser_features
staticmethod
Get features/capabilities for a backend.
get_parser_features
staticmethod def get_parser_features(backend: str) -> dict[str, Any]
Get features/capabilities for a backend.
Parameters 1
backend |
str |
Parser backend identifier |
Returns
Dictionary of parser featuresdict[str, Any]
—