1try:
2 # Python 2
3 from urllib2 import urlopen
4except ImportError:
5 from urllib.request import urlopen
6from lxml import etree
7
8url = "http://www.example.com/servlet/av/ResultTemplate=AVResult.html"
9response = urlopen(url)
10htmlparser = etree.HTMLParser()
11tree = etree.parse(response, htmlparser)
12tree.xpath(xpathselector)
13