Python 3 version of HTMLParser