diff --git a/lib/svtplay_dl/utils/text.py b/lib/svtplay_dl/utils/text.py index 31a1592..ac7e2e6 100644 --- a/lib/svtplay_dl/utils/text.py +++ b/lib/svtplay_dl/utils/text.py @@ -1,6 +1,6 @@ from __future__ import absolute_import -import html.parser as HTMLParser +import html import re import unicodedata @@ -22,10 +22,9 @@ def decode_html_entities(s): >>> print(decode_html_entities("<3 &")) <3 & """ - parser = HTMLParser.HTMLParser() def unesc(m): - return parser.unescape(m.group()) + return html.unescape(m.group()) return re.sub(r"(&[^;]+;)", unesc, ensure_unicode(s))