From d433010a6a0b1a76f7776ede3138e312ea1ace7a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 16 Sep 2023 22:23:09 +0300 Subject: [PATCH] Fix(parse_html/bkmk_parse_html): Fix imports --- parse_html/bkmk_parse_html.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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]+;)") -- 2.39.5