From: Oleg Broytman Date: Sat, 16 Sep 2023 19:23:09 +0000 (+0300) Subject: Fix(parse_html/bkmk_parse_html): Fix imports X-Git-Tag: 5.0.0~73 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d433010a6a0b1a76f7776ede3138e312ea1ace7a;p=bookmarks_db.git Fix(parse_html/bkmk_parse_html): Fix imports --- diff --git a/parse_html/bkmk_parse_html.py b/parse_html/bkmk_parse_html.py index 8d6cb7c..a3fc639 100644 --- a/parse_html/bkmk_parse_html.py +++ b/parse_html/bkmk_parse_html.py @@ -13,9 +13,14 @@ __all__ = ['parse_html', 'parse_filename', 'universal_charset'] import codecs import os +import re +from htmlentitydefs import name2codepoint from ..compat import unicode +DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic +parsers = [] + try: from . import bkmk_ph_beautifulsoup4 except ImportError: @@ -61,14 +66,7 @@ else: # else: # parsers.append(bkmk_ph_etreetidy.parse_html) -import re -from htmlentitydefs import name2codepoint - universal_charset = "utf-8" -DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic - -parsers = [] - entity_re = re.compile("(&\w+;)") num_entity_re = re.compile("(&#[0-9]+;)")