Debian Codegraph @

recipes/nu.recipe

raw
1 __license__ = 'GPL v3'
2 __copyright__ = '2009, Rob Hankel <from outerspace.com>'
3 '''
4 nu.nl
5 '''
6
7 from calibre.web.feeds.news import BasicNewsRecipe
8
9
10 class Nu(BasicNewsRecipe):
11 title = 'Nu.nl'
12 __author__ = 'Rob Hankel'
13
14 publisher = 'nu.nl'
15 description = 'Dutch News'
16 category = 'news'
17 oldest_article = 7
18 max_articles_per_feed = 100
19 no_stylesheets = True
20 use_embedded_content = False
21 encoding = 'utf-8'
22 remove_javascript = True
23 language = 'nl'
24
25 keep_only_tags = [dict(name='div', attrs={'id': ['leadarticle']})]
26
27 feeds = [
28 ('binnenland', 'http://www.nu.nl/feeds/rss/binnenland.rss'),
29 ('Algemeen nieuws', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Algemeen'),
30 ('Economie', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Economie'),
31 ('Internet', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Internet'),
32 ('Sport', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Sport'),
33 ('Achterklap', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Achterklap'),
34 ('Opmerkelijk', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Opmerkelijk'),
35 ('Muziek', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Muziek'),
36 ('DVD', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=DVD'),
37 ('Film', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Film'),
38 ('Boek', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Boek'),
39 ('Games', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Games'),
40 ('Columns', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Columns'),
41 ('Cartoon', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Cartoon'),
42 ('Lifehacking', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Lifehacking'),
43 ('Jurryt', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Jurryt'),
44 ('Formule 1', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Formule1'),
45 ('Plugged', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Plugged'),
46 ('Auto', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Auto'),
47 ('Wetenschap', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Wetenschap'),
48 ('Gezondheid', 'http://www.nu.nl/deeplink_rss2/index.jsp?r=Gezondheid'),
49 ('Dagelijkse tv-tips', 'http://www.nu.nl/tvgids/rss/tips'),
50 ('Podcast Algemeen nieuws', 'http://www.nu.nl/podcast.php'),
51 ]
52
53 def get_article_url(self, article):
54 return article.get('guid', None)