From: Oleg Broytman Date: Fri, 13 Aug 2010 13:19:27 +0000 (+0000) Subject: Insert lxml-based parser at the beginning. X-Git-Tag: v4.5.3~96 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=c26ca363d27b778a96f7d292dabd5258f307b693;p=bookmarks_db.git Insert lxml-based parser at the beginning. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@280 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/parse_html.py b/Robots/parse_html.py index bc9a8d4..5e8061c 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -12,6 +12,13 @@ DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic parsers = [] +try: + from parse_html_lxml import parse_html +except ImportError: + pass +else: + parsers.append(parse_html) + try: import parse_html_beautifulsoup parse_html_beautifulsoup.DEFAULT_CHARSET = DEFAULT_CHARSET