Raw HTML Parser

class html2ans.parsers.raw_html.RawHtmlParser[source]

Bases: html2ans.parsers.base.BaseElementParser

Raw HTML parser. ANS schema

Example:

<iframe src="https://app.stitcher.com/splayer/f/335403/58653169" width="220" height="150"></iframe>

->

{
    "type": "raw_html",
    "content": "<iframe src="https://app.stitcher.com/splayer/f/335403/58653169" width="220" height="150"></iframe>"
}
is_applicable(element, *args, **kwargs)[source]

Checks applicability using applicable_elements and, optionally, applicable_classes

Parameters

element (bs4.element.Tag or bs4.element.Comment or bs4.element.NavigableString) – the element to parse

parse(element, *args, **kwargs)[source]

Parses the given element.

Parameters

element (bs4.element.Tag or bs4.element.Comment or bs4.element.NavigableString) – the element to parse