| 1 |
__license__ = 'GPL v3' |
| 2 |
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>' |
| 3 |
''' |
| 4 |
politiken.dk |
| 5 |
''' |
| 6 |
|
| 7 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 8 |
|
| 9 |
|
| 10 |
class Politiken_dk(BasicNewsRecipe): |
| 11 |
title = 'Politiken.dk' |
| 12 |
__author__ = 'Darko Miletic' |
| 13 |
description = 'News from Denmark' |
| 14 |
publisher = 'politiken.dk' |
| 15 |
category = 'news, politics, Denmark' |
| 16 |
oldest_article = 2 |
| 17 |
max_articles_per_feed = 100 |
| 18 |
no_stylesheets = True |
| 19 |
remove_empty_feeds = True |
| 20 |
use_embedded_content = False |
| 21 |
encoding = 'cp1252' |
| 22 |
language = 'da' |
| 23 |
|
| 24 |
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } h1{font-family: Georgia,"Times New Roman",Times,serif } ' |
| 25 |
|
| 26 |
conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language} |
| 27 |
|
| 28 |
feeds = [ |
| 29 |
('Tophistorier', 'http://politiken.dk/rss/tophistorier.rss'), |
| 30 |
('Seneste nyt', 'http://politiken.dk/rss/senestenyt.rss'), |
| 31 |
('Mest laeste', 'http://politiken.dk/rss/mestlaeste.rss'), |
| 32 |
('Danmark', 'http://politiken.dk/rss/indland.rss'), |
| 33 |
('Politik', 'http://politiken.dk/rss/politik.rss'), |
| 34 |
('Klima', 'http://politiken.dk/rss/klima.rss'), |
| 35 |
('Internationalt', 'http://politiken.dk/rss/udland.rss'), |
| 36 |
('Erhverv', 'http://politiken.dk/rss/erhverv.rss'), |
| 37 |
('Kultur', 'http://politiken.dk/rss/kultur.rss'), |
| 38 |
('Sport', 'http://politiken.dk/rss/sport.rss'), |
| 39 |
('Uddannelse', 'http://politiken.dk/rss/uddannelse.rss'), |
| 40 |
] |
| 41 |
remove_tags_before = dict(name='h1') |
| 42 |
remove_tags = [dict(name=['object', 'link']), dict(name='div', attrs={'class': 'footer'})] |
| 43 |
|
| 44 |
def print_version(self, url): |
| 45 |
return url + '?service=print' |