use this refernce link
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc)
print(soup.prettify(formatter="html"))
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 “
Solution
use this refernce link
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc)
print(soup.prettify(formatter="html"))