how to parse malformed html in python,print(soup.prettify())