| 1 |
#!/usr/bin/env python |
| 2 |
# News source: https://www.rtvslo.si |
| 3 |
# License: GPLv3 |
| 4 |
# Copyright: 2022, TadejS |
| 5 |
|
| 6 |
|
| 7 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 8 |
|
| 9 |
|
| 10 |
class MMCRTV(BasicNewsRecipe): |
| 11 |
title = 'MMC RTV Slovenija' |
| 12 |
__author__ = 'TadejS' |
| 13 |
description = 'Prvi interaktivni multimedijski portal, MMC RTV Slovenija' |
| 14 |
oldest_article = 3 |
| 15 |
max_articles_per_feed = 100 |
| 16 |
language = 'sl' |
| 17 |
no_stylesheets = True |
| 18 |
use_embedded_content = False |
| 19 |
encoding = 'utf-8' |
| 20 |
publication_type = 'newspaper' |
| 21 |
|
| 22 |
cover_url = 'https://img.rtvslo.si/_static/novi/logo/tvmmc-light-bg.png' |
| 23 |
|
| 24 |
keep_only_tags = [ |
| 25 |
dict(name='header', attrs={'class': 'article-header'}), |
| 26 |
dict(name='div', attrs={'class': 'article-body'}), |
| 27 |
] |
| 28 |
remove_tags = [ |
| 29 |
dict(name='div', attrs={'class': 'gallery-grid'}), |
| 30 |
dict(name='div', attrs={'class': 'gallery'}), |
| 31 |
dict(name='div', attrs={'class': 'exposed-article'}), |
| 32 |
dict(name='div', attrs={'class': 'd-lg-none'}), |
| 33 |
dict(name='div', attrs={'class': 'section-heading'}), |
| 34 |
] |
| 35 |
|
| 36 |
feeds = [ |
| 37 |
('Slovenija', 'https://www.rtvslo.si/feeds/01.xml'), |
| 38 |
('Evropska unija', 'https://www.rtvslo.si/feeds/16.xml'), |
| 39 |
('Svet', 'https://www.rtvslo.si/feeds/02.xml'), |
| 40 |
('Gospodarstvo', 'https://www.rtvslo.si/feeds/04.xml'), |
| 41 |
('Okolje', 'https://www.rtvslo.si/feeds/12.xml'), |
| 42 |
('Znanost in tehnologija', 'https://www.rtvslo.si/feeds/09.xml'), |
| 43 |
('Kultura', 'https://www.rtvslo.si/feeds/05.xml'), |
| 44 |
('Šport', 'https://www.rtvslo.si/feeds/03.xml'), |
| 45 |
('Zabava', 'https://www.rtvslo.si/feeds/06.xml'), |
| 46 |
('Ture avanture', 'https://www.rtvslo.si/feeds/28.xml'), |
| 47 |
('Črna kronika', 'https://www.rtvslo.si/feeds/08.xml'), |
| 48 |
] |