From d424e394d144749c9ca2a2069e836ac7660916e0 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 1 Jan 2022 14:52:48 +0100 Subject: [PATCH] readabilite: use lxml bs4 parser for speed --- morss/readabilite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/readabilite.py b/morss/readabilite.py index 1789c2a..608dae4 100644 --- a/morss/readabilite.py +++ b/morss/readabilite.py @@ -24,7 +24,7 @@ import lxml.html.soupparser def parse(data, encoding=None): kwargs = {'from_encoding': encoding} if encoding else {} - return lxml.html.soupparser.fromstring(data, **kwargs) + return lxml.html.soupparser.fromstring(data, features='lxml', **kwargs) def count_words(string):