Converting to Python 3
Use html5lib treewalker to parse links instead of the dropped minidom.