| 1 |
import re |
| 2 |
|
| 3 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 4 |
|
| 5 |
|
| 6 |
class Tablety_pl(BasicNewsRecipe): |
| 7 |
title = 'Tablety.pl' |
| 8 |
__author__ = 'fenuks' |
| 9 |
description = 'Tablety, gry i aplikacje na tablety.' |
| 10 |
masthead_url = 'http://www.tablety.pl/wp-content/themes/kolektyw/img/logo.png' |
| 11 |
cover_url = 'http://www.tablety.pl/wp-content/themes/kolektyw/img/logo.png' |
| 12 |
category = 'IT' |
| 13 |
language = 'pl' |
| 14 |
use_embedded_content = False |
| 15 |
no_stylesheets = True |
| 16 |
oldest_article = 8 |
| 17 |
max_articles_per_feed = 100 |
| 18 |
preprocess_regexps = [ |
| 19 |
(re.compile('<p><strong>Przeczytaj także.*?</a></strong></p>', re.DOTALL), lambda match: ''), # noqa: RUF039 |
| 20 |
(re.compile(r'<p><strong>Przeczytaj koniecznie.*?</a></strong></p>', re.DOTALL), lambda match: ''), |
| 21 |
] # noqa: RUF039 |
| 22 |
keep_only_tags = [dict(attrs={'class': ['featured-image', 'article-content clearfix']})] |
| 23 |
remove_tags = [ |
| 24 |
dict(attrs={'class': ['comments_icon', 'wp-polls', 'entry-comments', 'wp-polls-loading', 'ts-fab-wrapper', 'entry-footer', 'social-custom']}) |
| 25 |
] |
| 26 |
feeds = [('Najnowsze posty', 'http://www.tablety.pl/feed/')] |