#!/usr/bin/env python import HTMLParser h = HTMLParser.HTMLParser() h.unescape('&#hearts;')