readability: more keywords to the filter list

Also fixed indentation
master
pictuga 2017-02-25 18:13:15 -10:00
parent 026903ce73
commit a5aec8c7a6
1 changed files with 9 additions and 8 deletions

View File

@ -31,12 +31,13 @@ def count_words(string):
return count
regex_bad = re.compile('|'.join(['combx', 'comment', 'community', 'disqus',
'extra', 'foot', 'header', 'menu', 'remark', 'rss', 'shoutbox', 'sidebar',
'sponsor', 'ad-break', 'agegate', 'pagination', 'pager', 'popup', 'tweet',
'twitter', 'com-', 'contact', 'footnote', 'masthead', 'media', 'meta',
'outbrain', 'promo', 'related', 'scroll', 'shoutbox', 'sidebar', 'sponsor',
'shopping', 'tags', 'tool', 'widget']), re.I)
regex_bad = re.compile('|'.join(['robots-nocontent', 'combx', 'comment',
'community', 'disqus', 'extra', 'foot', 'header', 'menu', 'remark', 'rss',
'shoutbox', 'sidebar', 'sponsor', 'ad-break', '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)
regex_good = re.compile('|'.join(['and', 'article', 'body', 'column',
'main', 'shadow', 'content', 'entry', 'hentry', 'main', 'page',