| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# from __future__ import unicode_literals, division, absolute_import, print_function |
| 3 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 4 |
|
| 5 |
__license__ = 'GPL v3' |
| 6 |
__copyright__ = '2014, 2023 Armin Geller' |
| 7 |
|
| 8 |
''' |
| 9 |
Fetch Deutschlandfunk & Deutschlandfunk Kultur |
| 10 |
''' |
| 11 |
## |
| 12 |
## Written: 2014-08-29 |
| 13 |
## Last Edited: 2023-04-26 |
| 14 |
## Version:1.6 |
| 15 |
## New RSS source: https://www.deutschlandfunk.de/rss-angebot-102.html |
| 16 |
|
| 17 |
|
| 18 |
class AdvancedUserRecipe1432200863(BasicNewsRecipe): |
| 19 |
title = 'Deutschlandfunk & Deutschlandfunk Kultur' |
| 20 |
__author__ = 'Armin Geller' |
| 21 |
publisher = 'Deutschlandfunk' |
| 22 |
category = 'Radio, News, Politics, Social, Culture, Nature, Environmental' |
| 23 |
timefmt = ' [%a, %d %b %Y]' |
| 24 |
language = 'de' |
| 25 |
encoding = 'UTF-8' |
| 26 |
publication_type = 'News feed' |
| 27 |
oldest_article = 2 |
| 28 |
max_articles_per_feed = 100 |
| 29 |
auto_cleanup = False |
| 30 |
|
| 31 |
extra_css = ''' |
| 32 |
h1, h2 {font-size: 1.6em; text-align: left} |
| 33 |
.article-header-description {font-size: 1em; font-style: italic; font-weight: normal;margin-bottom: 1em} |
| 34 |
.b-image-figure, .caption-figure.is-left, .b-image-credits {font-size: .75em; font-weight: normal;margin-bottom: .75em} |
| 35 |
''' |
| 36 |
|
| 37 |
feeds = [ |
| 38 |
('DLF Nachrichten', 'https://www.deutschlandfunk.de/nachrichten-100.rss'), |
| 39 |
('DLF Politikportal', 'https://www.deutschlandfunk.de/politikportal-100.rss'), |
| 40 |
('DLF Wirtschaft', 'https://www.deutschlandfunk.de/wirtschaft-106.rss'), |
| 41 |
('DLF Wissen', 'https://www.deutschlandfunk.de/wissen-106.rss'), |
| 42 |
('DLF Kulturportal', 'https://www.deutschlandfunk.de/kulturportal-100.rss'), |
| 43 |
('DLF Europa', 'https://www.deutschlandfunk.de/europa-112.rss'), |
| 44 |
('DLF Gesellschaft', 'https://www.deutschlandfunk.de/gesellschaft-106.rss'), |
| 45 |
('DLF Sportportal', 'https://www.deutschlandfunk.de/sportportal-100.rss'), |
| 46 |
('DLF-Kultur Politik', 'https://www.deutschlandfunkkultur.de/politik-114.rss'), |
| 47 |
('DLF-Kultur Bücher', 'https://www.deutschlandfunkkultur.de/buecher-108.rss'), |
| 48 |
('DLF-Kultur Musikportal', 'https://www.deutschlandfunkkultur.de/musikportal-100.rss'), |
| 49 |
('DLF-Kultur Wissenschaft', 'https://www.deutschlandfunkkultur.de/wissenschaft-108.rss'), |
| 50 |
('DLF-Kultur Meinung / Debatte', 'https://www.deutschlandfunkkultur.de/meinung-debatte-100.rss'), |
| 51 |
('DLF-Kultur Umwelt', 'https://www.deutschlandfunkkultur.de/umwelt-104.rss'), |
| 52 |
('DLF-Kultur Philosophie', 'https://www.deutschlandfunkkultur.de/philosophie-104.rss'), |
| 53 |
('DLF-Kultur Psychologie', 'https://www.deutschlandfunkkultur.de/psychologie-100.rss'), |
| 54 |
('DLF-Kultur Geschichte', 'https://www.deutschlandfunkkultur.de/geschichte-136.rss'), |
| 55 |
('DLF-Kultur Leben', 'https://www.deutschlandfunkkultur.de/leben-108.rss'), |
| 56 |
('DLF-Kultur Bühne', 'https://www.deutschlandfunkkultur.de/buehne-100.rss'), |
| 57 |
('DLF-Kultur Film / Serie', 'https://www.deutschlandfunkkultur.de/film-serie-100.rss'), |
| 58 |
] |
| 59 |
keep_only_tags = [ |
| 60 |
dict(name='nav', attrs={'class': 'b-breadcrumbs'}), # DLF articles |
| 61 |
dict(name='article', attrs={'class': 'b-article'}), # DLF articles |
| 62 |
dict( |
| 63 |
name='div', |
| 64 |
attrs={ |
| 65 |
'class': [ |
| 66 |
'b-section-article-head-area', |
| 67 |
'b-section-editor-content', |
| 68 |
] |
| 69 |
}, |
| 70 |
), # DLF Kultur articles |
| 71 |
] |
| 72 |
|
| 73 |
remove_tags = [ |
| 74 |
dict( |
| 75 |
name='div', |
| 76 |
attrs={ |
| 77 |
'class': [ |
| 78 |
# 'article-header-actions', |
| 79 |
'b-article-extended-emphasis is-teaser-list u-space-bottom-xl', |
| 80 |
'article-extended-emphasis-teaser-group', |
| 81 |
'b-embed-opt-in js-embed-opt-in', |
| 82 |
] |
| 83 |
}, |
| 84 |
), # DLF articles |
| 85 |
dict(name='ul', attrs={'class': ['b-social-icons']}), # DLF articles |
| 86 |
dict(name='ul', attrs={'class': ['b-social-icons']}), # DLF Kultur articles |
| 87 |
dict(name='div', attrs={'class': 'b-footer-area-series'}), # DLF Kultur articles |
| 88 |
dict(name='div', attrs={'id': 'weekender'}), |
| 89 |
] |