diff --git a/morss/crawler.py b/morss/crawler.py index b1f3d88..2cafd4e 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -98,7 +98,7 @@ def detect_encoding(data, con=None): if match: return match.groups()[0].lower().decode() - enc = chardet.detect(data)['encoding'] + enc = chardet.detect(data[-2000:])['encoding'] if enc and enc != 'ascii': return enc