What I am thinking of is moving parsing into static methods on Elements.
Element gets a from_lxml(lxml_elem) method
HTMLElement also gets a from_html(html: str) method
Elements are not initialized with their parents or tags, but with their children. This is useful for elements like picture or audio that depend on their content
What I am thinking of is moving parsing into static methods on
Element
s.Element
gets afrom_lxml(lxml_elem)
methodHTMLElement
also gets afrom_html(html: str)
methodpicture
oraudio
that depend on their content__init__
.