There is a simple library lxml in python. With this a sample script for looking up information in a website could look like this:
from urllib import urlopen, urlencode
from httplib import HTTPConnection
from lxml import etree
sock= urlopen(url)
html= sock.read()
sock.close()
f= open(fn,"w")
f.write(html)
f.close()
htmlParser= etree.HTMLParser()
tree= etree.parse(fn, htmlParser)
info= tree.xpath(" path ")