From: Oleg Broytman Date: Sat, 11 Nov 2023 20:10:39 +0000 (+0300) Subject: Fix(Py3): Fix `htmlentities` import X-Git-Tag: 5.0.0~57 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e146ac995fdf0f2d4911908ba7ff0230cb182054;p=bookmarks_db.git Fix(Py3): Fix `htmlentities` import --- diff --git a/parse_html/bkmk_parse_html.py b/parse_html/bkmk_parse_html.py index 69d9035..ddfad27 100644 --- a/parse_html/bkmk_parse_html.py +++ b/parse_html/bkmk_parse_html.py @@ -14,7 +14,10 @@ __all__ = ['parse_html', 'parse_filename', 'universal_charset'] import codecs import os import re -from htmlentitydefs import name2codepoint +try: + from html.entities import name2codepoint +except ImportError: + from htmlentitydefs import name2codepoint from compat import unicode, unichr