| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
# https://manual.calibre-ebook.com/news_recipe.html |
| 4 |
from __future__ import absolute_import, division, print_function, unicode_literals |
| 5 |
|
| 6 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 7 |
|
| 8 |
''' |
| 9 |
Politiko.dk |
| 10 |
''' |
| 11 |
|
| 12 |
|
| 13 |
class PolitikoDK(BasicNewsRecipe): |
| 14 |
title = 'Politiko | Berlingskes politiske site' |
| 15 |
__author__ = 'CoderAllan.github.com' |
| 16 |
publisher = 'Berlingske Media' |
| 17 |
description = 'Læs de seneste nyheder om dansk politik. På Politiko får du alt om politik samlet et sted - Politiko.dk' |
| 18 |
category = 'news, politics, money, Denmark' |
| 19 |
oldest_article = 2 |
| 20 |
max_articles_per_feed = 50 |
| 21 |
no_stylesheets = True |
| 22 |
encoding = 'utf8' |
| 23 |
use_embedded_content = False |
| 24 |
language = 'da' |
| 25 |
auto_cleanup = False |
| 26 |
|
| 27 |
keep_only_tags = [ |
| 28 |
dict(name='h1', attrs={'class': 'article-headline'}), |
| 29 |
dict(name='p', attrs={'class': 'article-summary'}), |
| 30 |
dict(name='div', attrs={'class': 'article-date'}), |
| 31 |
dict(name='div', attrs={'class': 'article-content'}), |
| 32 |
] |
| 33 |
|
| 34 |
# Feed are found here: http://www.b.dk/rss |
| 35 |
feeds = [ |
| 36 |
('Nyheder', 'http://www.politiko.dk/feeds/rss/nyheder'), |
| 37 |
('Politisk Morgenpost', 'http://www.politiko.dk/taxonomy_rss/329960/rss'), |
| 38 |
('Den Politiske Puls', 'http://puls.politiko.dk/feed/'), |
| 39 |
('Analyse og perspektiv', 'http://www.politiko.dk/feeds/rss/analyser'), |
| 40 |
('Longreads', 'http://www.politiko.dk/feeds/rss/longreads'), |
| 41 |
] |