Question

This error occurs after loading the document into beautifulsoup
The document contains entities like “ which gets converted to ΓÇ£
I want to output the html entities “

Was it helpful?

Solution

use this refernce link

 from bs4 import BeautifulSoup
    soup = BeautifulSoup(html_doc)
    print(soup.prettify(formatter="html"))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top