| 1 |
import re |
| 2 |
|
| 3 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 4 |
|
| 5 |
|
| 6 |
class NaTemat(BasicNewsRecipe): |
| 7 |
title = 'NaTemat.pl' |
| 8 |
oldest_article = 7 |
| 9 |
max_articles_per_feed = 100 |
| 10 |
__author__ = 'fenuks' |
| 11 |
description = 'informacje, komentarze, opinie' |
| 12 |
category = 'news' |
| 13 |
language = 'pl' |
| 14 |
preprocess_regexps = [ |
| 15 |
(re.compile('Czytaj też\\:.*?</a>', re.IGNORECASE), lambda m: ''), # noqa: E501, RUF039 |
| 16 |
(re.compile('Zobacz też\\:.*?</a>', re.IGNORECASE), lambda m: ''), # noqa: E501, RUF039 |
| 17 |
(re.compile('Czytaj więcej\\:.*?</a>', re.IGNORECASE), lambda m: ''), # noqa: E501, RUF039 |
| 18 |
(re.compile('Czytaj również\\:.*?</a>', re.IGNORECASE), lambda m: ''), # noqa: E501, RUF039 |
| 19 |
] |
| 20 |
cover_url = 'http://blog.plona.pl/wp-content/uploads/2012/05/natemat.png' |
| 21 |
no_stylesheets = True |
| 22 |
keep_only_tags = [dict(id='main')] |
| 23 |
remove_tags = [ |
| 24 |
dict(attrs={'class': ['button', 'block-inside style_default', 'article-related', 'user-header', 'links']}), |
| 25 |
dict(name='img', attrs={'class': 'indent'}), |
| 26 |
] |
| 27 |
feeds = [('Artyku\u0142y', 'http://natemat.pl/rss/wszystkie')] |