title: How to parse malformed HTML in python
body: <p>I need to browse the DOM tree of a parsed HTML document.</p>
  
  <p>I'm using uTidyLib before parsing the string with lxml</p>
  
  <p>a = tidy.parseString(html_code, options)
  dom = etree.fromstring(str(a))</p>
  
  <p>sometimes I get an error, it seems that tidylib is not able to repair malformed html.</p>
  
  <p>how can I parse every HTML file without getting an error (parsing only some parts of files that can not be repaired)?</p>