Detect encoding (using crawler) before readabilite

master
pictuga 2017-03-11 02:30:57 -10:00
parent c952b85d92
commit f4abc4e8a4
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ def ItemFill(item, options, feedurl='/', fast=False):
log('non-text page') log('non-text page')
return True 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): if options.hungry or count_words(out) > max(count_content, count_desc):
item.push_content(out) item.push_content(out)