calibre/recipes/politiko_dk.recipe
Kovid Goyal 29cd8d64ea
Change shebangs to python from python2
Also remove a few other miscellaneous references to python2
2020-08-22 18:47:51 +05:30

41 lines
1.6 KiB
Python

#!/usr/bin/env python
# vim:fileencoding=utf-8
# https://manual.calibre-ebook.com/news_recipe.html
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe
'''
Politiko.dk
'''
class PolitikoDK(BasicNewsRecipe):
title = 'Politiko | Berlingskes politiske site'
__author__ = 'CoderAllan.github.com'
publisher = 'Berlingske Media'
description = ('Læs de seneste nyheder om dansk politik. På Politiko får du alt om'
' politik samlet et sted - Politiko.dk')
category = 'news, politics, money, Denmark'
oldest_article = 2
max_articles_per_feed = 50
no_stylesheets = True
encoding = 'utf8'
use_embedded_content = False
language = 'da'
auto_cleanup = False
keep_only_tags = [
dict(name="h1", attrs={'class': 'article-headline'}),
dict(name="p", attrs={'class': 'article-summary'}),
dict(name="div", attrs={'class': 'article-date'}),
dict(name="div", attrs={'class': 'article-content'}),
]
# Feed are found here: http://www.b.dk/rss
feeds = [
('Nyheder', 'http://www.politiko.dk/feeds/rss/nyheder'),
('Politisk Morgenpost', 'http://www.politiko.dk/taxonomy_rss/329960/rss'),
('Den Politiske Puls', 'http://puls.politiko.dk/feed/'),
('Analyse og perspektiv', 'http://www.politiko.dk/feeds/rss/analyser'),
('Longreads', 'http://www.politiko.dk/feeds/rss/longreads'),
]