How to parse malformed HTML in python,print(soup.prettify())