How to show formatted/indented HTML code in Jupyter notebook
Have you tried to use a print?
Jupyter (like ipython) calls the __repr__ method for the result of the operation.
In this case, it's the __repr__ of a string, which adds the simple quotes and escapes the special characters (\n, \t...) so they are not interpreted.
But those characters are interpreted with print
Is it possible to output formatted raw HTML code in Jupyter as with prettify from BeautifulSoup?
When I call prettify in Jupyter, it gives me the same messy output as with simply calling .content on the result I get from requests.get.