How to Solve NameError: name 'HTMLParser' is not defined -- six

Solution: Import the 'HTMLParser' module

# Add the following line to the top of your code
from six.moves.html_parser import HTMLParser

 

For more information:
six HTMLParser