def cleanup_html(html):
 match = _body_re.search(html)
 if match:
  html = html[match.end():]
 match = _end_body_re.search(html)
 if match:
  html = html[:match.start()]
 html = _ins_del_re.sub('', html)
 return html

def cleanup_html ( html ) : match = _body_re . search ( html ) if match : html = html [ match . end ( ) : ] match = _end_body_re . search ( html ) if match : html = html [ : match . start ( ) ] html = _ins_del_re . sub ( '' , html ) return html
this cleans the html .