| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 4 |
|
| 5 |
|
| 6 |
class SalzburgerNachrichten(BasicNewsRecipe): |
| 7 |
title = 'Salzburger Nachrichten' |
| 8 |
__author__ = 'İlker Melik Sıtkı' |
| 9 |
oldest_article = 1 |
| 10 |
max_articles_per_feed = 10 |
| 11 |
language = 'de_AT' |
| 12 |
remove_javascript = True |
| 13 |
no_stylesheets = True |
| 14 |
remove_empty_feeds = True |
| 15 |
compress_news_images = True |
| 16 |
ignore_duplicate_articles = {'url'} |
| 17 |
cover_url = 'https://front.e-pages.dk/data/teasers/salzburgernachrichten/308/vector/ts1.jpg' |
| 18 |
|
| 19 |
extra_css = '''.article-title {font-size: 1.5em; color: #0358a9;} |
| 20 |
h2 {font-size: 1.2em; color: #0358a9;}''' |
| 21 |
|
| 22 |
keep_only_tags = [ |
| 23 |
dict(name='h1', attrs={'class': 'article-title'}), |
| 24 |
dict(name='div', attrs={'class': 'article-author'}), |
| 25 |
dict(name='div', attrs={'class': 'article-publication-date'}), |
| 26 |
dict(name='div', attrs={'class': 'media-normal'}), |
| 27 |
dict(name='div', attrs={'class': 'article-body-text'}), |
| 28 |
dict(name='div', attrs={'class': 'article-sections'}), |
| 29 |
] |
| 30 |
|
| 31 |
remove_tags = [ |
| 32 |
dict(name='source'), |
| 33 |
dict(name='figcaption'), |
| 34 |
dict(name='img', attrs={'class': 'article-author__logo'}), |
| 35 |
dict(name='p', attrs={'class': 'article-author__desktopprefix'}), |
| 36 |
] |
| 37 |
|
| 38 |
feeds = [ |
| 39 |
('Salzburg', 'https://www.sn.at/salzburg/xml/rss'), |
| 40 |
('Innenpolitik', 'https://www.sn.at/politik/innenpolitik/xml/rss'), |
| 41 |
('Weltpolitik', 'https://www.sn.at/politik/weltpolitik/xml/rss'), |
| 42 |
('Wirtschaft', 'https://www.sn.at/wirtschaft/xml/rss'), |
| 43 |
('Kultur', 'https://www.sn.at/kultur/xml/rss'), |
| 44 |
('Leben', 'https://www.sn.at/leben/xml/rss'), |
| 45 |
('Wetter', 'https://www.sn.at/wetter/xml/rss'), |
| 46 |
('Festspiele', 'https://www.sn.at/festspiele/xml/rss'), |
| 47 |
('Sport', 'https://www.sn.at/sport/xml/rss'), |
| 48 |
('Panorama', 'https://www.sn.at/panorama/xml/rss'), |
| 49 |
('Wissen', 'https://www.sn.at/wissen/xml/rss'), |
| 50 |
('Wochenende', 'https://www.sn.at/panorama/wissen/xml/rss'), |
| 51 |
('Kinderseite', 'https://www.sn.at/panorama/kinder/xml/rss'), |
| 52 |
('Jengeseite', 'https://www.sn.at/jungeseite/xml/rss'), |
| 53 |
('SNin', 'https://www.sn.at/snin/xml/rss'), |
| 54 |
('Chronik Österreich', 'https://www.sn.at/panorama/oesterreich/xml/rss'), |
| 55 |
('Chronik International', 'https://www.sn.at/panorama/international/xml/rss'), |
| 56 |
('Medien', 'https://www.sn.at/panorama/medien/xml/rss'), |
| 57 |
('Briefe an die SN', 'https://www.sn.at/leserforum/xml/rss'), |
| 58 |
('Veranstaltungen', 'https://www.sn.at/veranstaltungen/xml/rss'), |
| 59 |
('Klimawandel', 'https://www.sn.at/panorama/klimawandel/xml/rss'), |
| 60 |
] |