0
htmldoc.text

html tags are ignored. I want pretty print for html tags such as table , br.

What easy way are you using to do that?

dlis168
  • 11
  • 5

1 Answers1

0

I think you want beautiful soup.

from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc, 'html.parser')

print(soup.prettify())
Martin Bobak
  • 1,979
  • 2
  • 24
  • 44