diff --git a/morss/readabilite.py b/morss/readabilite.py index 8cc5d53..63d6384 100644 --- a/morss/readabilite.py +++ b/morss/readabilite.py @@ -352,6 +352,10 @@ def get_article(data, url=None, encoding_in=None, encoding_out='unicode', debug= else: best = get_best_node(html, threshold) + if best is None: + # if threshold not met + return None + # clean up if not debug: keep_threshold = get_score(best) * 3/4