code: def html_fromstring(s):
      
      if isinstance(s, six.text_type):
          s = s.encode('utf8')
      try:
          if html_too_big(s):
              return None
  
          return html5parser.fromstring(s, parser=_html5lib_parser())
      except Exception:
          pass
docs: Parse html tree from string. Return None if the string can't be parsed.