fix article parsing

This commit is contained in:
Tomasz Długosz 2018-10-06 23:31:15 +02:00
parent ec5fea9c5e
commit 988a6ffece

View File

@ -16,7 +16,7 @@ class Tablety_pl(BasicNewsRecipe):
max_articles_per_feed = 100
preprocess_regexps = [(re.compile(u'<p><strong>Przeczytaj także.*?</a></strong></p>', re.DOTALL), lambda match: ''),
(re.compile(u'<p><strong>Przeczytaj koniecznie.*?</a></strong></p>', re.DOTALL), lambda match: '')]
keep_only_tags = [dict(id='news_block')]
keep_only_tags = [dict(attrs={'class': ['featured-image', 'article-content clearfix']})]
remove_tags = [dict(attrs={'class': ['comments_icon', 'wp-polls', 'entry-comments',
'wp-polls-loading', 'ts-fab-wrapper', 'entry-footer', 'social-custom']})]
feeds = [(u'Najnowsze posty', u'http://www.tablety.pl/feed/')]