def parse_html(html_text, charset=None, log=None):
+ if not html_text:
+ return None
root = _parse_html(html_text, charset)
if root is None:
return None
def parse_html(html_text, charset=None, log=None):
+ if not html_text:
+ return None
root = _parse_html(html_text, charset)
if root is None:
return None
def parse_html(html_text, charset=None, log=None):
+ if not html_text:
+ return None
try:
html_tree = TidyHTMLTreeBuilder.parseString(html_text)
except:
def parse_html(html_text, charset=None, log=None):
+ if not html_text:
+ return None
parser = HTML5Parser()
if isinstance(html_text, bytes):
html_tree = parser.parse(
def parse_html(html_text, charset=None, log=None):
+ if not html_text:
+ return None
parser = HTMLParser(charset)
try: