From 79a8ada9f4d0f7f9134d7697d57a5250fd51f5b0 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 19 Mar 2017 01:57:54 -1000 Subject: [PATCH] readabilite: add tags to score --- morss/readabilite.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/morss/readabilite.py b/morss/readabilite.py index 19e4114..9cc9162 100644 --- a/morss/readabilite.py +++ b/morss/readabilite.py @@ -37,17 +37,17 @@ def count_words(string): regex_bad = re.compile('|'.join(['robots-nocontent', 'combx', 'comment', 'community', 'disqus', 'extra', 'foot', 'header', 'menu', 'remark', 'rss', - 'shoutbox', 'sidebar', 'sponsor', 'ad-break', 'agegate', 'pagination', + 'shoutbox', 'sidebar', 'sponsor', 'ad-', 'agegate', 'pagination', 'pager', 'popup', 'tweet', 'twitter', 'com-', 'sharing', 'share', 'social', 'contact', 'footnote', 'masthead', 'media', 'meta', 'outbrain', 'promo', 'related', 'scroll', 'shoutbox', 'sidebar', 'sponsor', 'shopping', 'tags', - 'tool', 'widget']), re.I) + 'tool', 'widget', 'hide']), re.I) regex_good = re.compile('|'.join(['and', 'article', 'body', 'column', 'main', 'shadow', 'content', 'entry', 'hentry', 'main', 'page', - 'pagination', 'post', 'text', 'blog', 'story', 'par']), re.I) + 'pagination', 'post', 'text', 'blog', 'story', 'par', 'editorial']), re.I) -tags_junk = ['script', 'head', 'iframe', 'object', 'noscript', 'param', 'embed', 'layer', 'applet', 'style'] +tags_junk = ['script', 'head', 'iframe', 'object', 'noscript', 'param', 'embed', 'layer', 'applet', 'style', 'form', 'input', 'textarea'] attributes_fine = ['title', 'src', 'href', 'type', 'name', 'for', 'value']