Use readabilite properly

Not thru some weird wrapper anymore
master
pictuga 2017-02-28 22:45:26 -10:00
parent 52661985d1
commit 60e3311e97
1 changed files with 2 additions and 7 deletions

View File

@ -15,6 +15,7 @@ import lxml.html
from . import feeds
from . import feedify
from . import crawler
from . import readabilite
import wsgiref.simple_server
import wsgiref.handlers
@ -79,12 +80,6 @@ def log(txt, force=False):
print(repr(txt))
from . import readabilite
def readability(html, url):
return readabilite.get_article(html)
def len_html(txt):
if len(txt):
return len(lxml.html.fromstring(txt).text_content())
@ -287,7 +282,7 @@ def Fill(item, options, feedurl='/', fast=False):
log('non-text page')
return True
out = readability(data, con.url)
out = readabilite.get_article(data)
if options.hungry or count_words(out) > max(count_content, count_desc):
item.push_content(out)