aidputils.agents.tools.http.parsers.html_parser

HTML response parser.

Wraps existing html_parser.py functionality for pluggable architecture.

class aidputils.agents.tools.http.parsers.html_parser.HtmlResponseParser[source]

Bases: ResponseParser

Parser for HTML responses.

classmethod content_types() List[str][source]

Return content-types this parser handles.

parse(raw_data: Any, headers: Dict[str, str]) Any[source]

Parse HTML response data.

Parameters:
  • raw_data – Raw response data (string or bytes)

  • headers – Response headers

Returns:

HTML string

get_response_type() str[source]

Return response type identifier.