]> git.phdru.name Git - bookmarks_db.git/blobdiff - parse_html/bkmk_parse_html.py
Style: Fix flake8 E402 module level import not at top of file
[bookmarks_db.git] / parse_html / bkmk_parse_html.py
index 07fe32e3e7e6a658ec82f0123acff746a7ac0b01..c14d055dfe9213556b48bf60fc4ee467d3888a39 100644 (file)
@@ -12,11 +12,7 @@ __all__ = ['parse_html', 'parse_filename', 'universal_charset']
 
 
 import codecs
-
-universal_charset = "utf-8"
-DEFAULT_CHARSET = "cp1251"  # Stupid default for Russian Cyrillic
-
-parsers = []
+import os
 
 try:
     from . import bkmk_ph_beautifulsoup4
@@ -66,6 +62,11 @@ else:
 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]+;)")
 
@@ -93,7 +94,6 @@ def recode_entities(title, charset):
     return ''.join(output)
 
 
-import os
 BKMK_DEBUG_HTML_PARSERS = os.environ.get("BKMK_DEBUG_HTML_PARSERS")