Python: html5lib parser example

Really easy to use:

import html5lib
file = open("web.html")
parser = html5lib.HTMLParser()
doc = parser.parse(file)
Advertisements