From f4abc4e8a4c7059dfe6d6d293bf3050921ff3785 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 11 Mar 2017 02:30:57 -1000 Subject: [PATCH] Detect encoding (using crawler) before readabilite --- morss/morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index fb3eb89..f3ea9fd 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -279,7 +279,7 @@ def ItemFill(item, options, feedurl='/', fast=False): log('non-text page') return True - out = readabilite.get_article(data, options.encoding) + out = readabilite.get_article(data, options.encoding or crawler.detect_encoding(data, con)) if options.hungry or count_words(out) > max(count_content, count_desc): item.push_content(out)