def get_html_text(html: str): parser = HTMLParser() parser.text = "" parser.important_tag = True parser.feed(html) return parser.text.strip()