parsers = []
try:
- from parse_html_lxml import parse_html
+ import parse_html_beautifulsoup
+ parse_html_beautifulsoup.DEFAULT_CHARSET = DEFAULT_CHARSET
except ImportError:
pass
else:
- parsers.append(parse_html)
+ parsers.append(parse_html_beautifulsoup.parse_html)
try:
- import parse_html_beautifulsoup
- parse_html_beautifulsoup.DEFAULT_CHARSET = DEFAULT_CHARSET
+ from parse_html_lxml import parse_html
except ImportError:
pass
else:
- parsers.append(parse_html_beautifulsoup.parse_html)
+ parsers.append(parse_html)
try:
from parse_html_htmlparser import parse_html