woensdag 22 oktober 2008

How to pretty-print an "ugly HTML" document

Using Python and the BeautifulSoup module:

from BeautifulSoup import BeautifulSoup
html = '' # insert UHTML here
soup=BeautifulSoup(html)
print soup.prettify()

0 reacties: