mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-27 21:22:39 +01:00
utils/web.py: Properly import chardet.
This commit is contained in:
parent
8095f34250
commit
a82ad9cb1a
@ -190,7 +190,7 @@ def htmlToText(s, tagReplace=' '):
|
||||
"""Turns HTML into text. tagReplace is a string to replace HTML tags with.
|
||||
"""
|
||||
try:
|
||||
import chardet
|
||||
import chardet.universaldetector
|
||||
except ImportError:
|
||||
s = s.decode('utf8')
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user