<p>Using the Python Documentation I found the <a href="http://docs.python.org/lib/module-HTMLParser.html" rel="noreferrer">HTML parser</a> but I have no idea which library to import to use it, how do I find this out (bearing in mind it doesn't say on the page).</p>

[{'answer_id': 71161, 'author': '1077', 'author_id': 10776, 'author_profile': 'https://Stackoverflow.com/users/10776', 'pm_score': 5, 'selected': True, 'text': '<p>Try:</p>\n\n<pre><code>import HTMLParser\n</code></pre>\n\n<p>In Python 3.0, the HTMLParser module has been renamed to html.parser\nyou can check about this <a href="http://docs.python.org/library/htmlparser.html" rel="noreferrer">here</a></p>\n\n<p>Python 3.0</p>\n\n<pre><code>import html.parser\n</code></pre>\n\n<p>Python 2.2 and above</p>\n\n<pre><code>import HTMLParser\n</code></pre>\n'}, {'answer_id': 71168, 'author': 'Vytautas Šaltenis', 'author_id': 6763, 'author_profile': 'https://Stackoverflow.com/users/6763', 'pm_score': 1, 'selected': False, 'text': '<p>There\'s a link to an example on the bottom of (<a href="http://docs.python.org/2/library/htmlparser.html" rel="nofollow noreferrer">http://docs.python.org/2/library/htmlparser.html</a>) , it just doesn\'t work with the original python or python3.  It has to be python2 as it says on the top.</p>\n'}, {'answer_id': 71174, 'author': 'Vinko Vrsalovic', 'author_id': 5190, 'author_profile': 'https://Stackoverflow.com/users/5190', 'pm_score': 5, 'selected': False, 'text': '<p>You probably really want <a href="https://stackoverflow.com/questions/55391/python-regular-expression-for-html-parsing-beautifulsoup#55424">BeautifulSoup</a>, check the link for an example. </p>\n\n<p>But in any case</p>\n\n<pre><code>&gt;&gt;&gt; import HTMLParser\n&gt;&gt;&gt; h = HTMLParser.HTMLParser()\n&gt;&gt;&gt; h.feed(\'&lt;html&gt;&lt;/html&gt;\')\n&gt;&gt;&gt; h.get_starttag_text()\n\'&lt;html&gt;\'\n&gt;&gt;&gt; h.close()\n</code></pre>\n'}, {'answer_id': 71176, 'author': 'Swaroop C H', 'author_id': 4869, 'author_profile': 'https://Stackoverflow.com/users/4869', 'pm_score': 2, 'selected': False, 'text': '<p>I would recommend using <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow noreferrer">Beautiful Soup</a> module instead and it has <a href="http://www.crummy.com/software/BeautifulSoup/documentation.html" rel="nofollow noreferrer">good documentation</a>.</p>\n'}, {'answer_id': 71186, 'author': 'Antti Rasinen', 'author_id': 8570, 'author_profile': 'https://Stackoverflow.com/users/8570', 'pm_score': 1, 'selected': False, 'text': '<p>For real world HTML processing I\'d recommend <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow noreferrer">BeautifulSoup</a>. It is great and takes away much of the pain. Installation is easy.</p>\n'}, {'answer_id': 71614, 'author': 'Alexey Feldgendler', 'author_id': 10682, 'author_profile': 'https://Stackoverflow.com/users/10682', 'pm_score': 2, 'selected': False, 'text': '<p>You should also look at <a href="http://code.google.com/p/html5lib/" rel="nofollow noreferrer">html5lib</a> for Python as it tries to parse HTML in a way that very much resembles what web browsers do, especially when dealing with invalid HTML (which is more than 90% of today\'s web).</p>\n'}, {'answer_id': 72100, 'author': '1077', 'author_id': 10776, 'author_profile': 'https://Stackoverflow.com/users/10776', 'pm_score': 2, 'selected': False, 'text': "<p>I don't recommend BeautifulSoup if you want speed. lxml is much, much faster, and you can fall back in lxml's BS soupparser if the default parser doesn't work.</p>\n"}, {'answer_id': 82117, 'author': 'Paweł Hajdan', 'author_id': 9403, 'author_profile': 'https://Stackoverflow.com/users/9403', 'pm_score': 2, 'selected': False, 'text': '<p>You may be interested in <a href="http://codespeak.net/lxml/" rel="nofollow noreferrer">lxml</a>. It is a separate package and has C components, but is the fastest. It has also very nice API, allowing you to easily list links in HTML documents, or list forms, sanitize HTML, and more. It also has capabilities to parse not well-formed HTML (it\'s configurable).</p>\n'}]
['https://Stackoverflow.com/questions/71151', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1384652/']