HtlmReader
Overview
The HtmlReader class converts the html format into markdown. It is a child object from the generic IReader class.
Parameters
htlm_content: str- The html content.
Attributes
soup: BeautifulSoup- The BeautifulSoup object of the html content.
Methods
Usage Example
Code
htlm_content = '<h1>Header</h1><p>Paragraph</p>'
reader = HtmlReader(htlm_content)
markdown = reader.convert_to_markdown()
print(markdown)