import lib.error

try:

	import lxml.html, urllib.request

	def href(url, *args):
		conn = urllib.request.urlopen(url)
		tree = lxml.html.parse(conn)
		title = tree.find('.//title')
		if title is not None : text = title.text
		else : text = url
		fmt = '<a href="%s">%s</a>'
		print(fmt % (url, text))

		if len(args) : href(*args)

except ImportError as cause:

	e = lib.error.ModuleMissingException(cause, "lxml")

	href = lambda url, *args : lib.error.throw(e)
@@ -30,20 +30,21 @@
 rt lxml.
-html
+etree
 , urllib
@@ -113,16 +113,69 @@
 en(url)%0A
+%09%09parser = lxml.etree.HTMLParser(encoding = %22utf-8%22)%0A
 %09%09tree =
@@ -184,12 +184,13 @@
 xml.
-html
+etree
 .par
@@ -196,16 +196,31 @@
 rse(conn
+, parser=parser
 )%0A%09%09titl

fix #26