In bs4 convertEntities parameter to the BeautifulSoup constructor is no longer supported. HTML objects are always converted to the corresponding Unicode characters (see docs ).
According to the docs, you need to use an output formatter, for example:
print soup.find_all('td')[0].prettify(formatter="html")
alecxe
source share