I am building a scraper where I want to extract the data from some tags as it is without any conversion. But Beautifulsoup changing some hex values to ASCII. For example, this code gets converted into ASCII
html = """\
<title>Billing address - PayPal</title>
<title>Billing address - PayPal</title>"""
Here's the small example of the code
from bs4 import BeautifulSoup
soup = BeautifulSoup(html, "lxml")
for element in soup.findAll(['title', 'form', 'a']):
print(str(element))
But I want to extract the data in the same form. I believe BeautifulSoup 4 auto converting HTML entities and this is what I don't want. Any help would be really appreciated.
BTW I am using Python 3.5 and Beautifulsoup 4