home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3947 < prev    next >
Encoding:
Text File  |  2009-12-12  |  2.5 KB  |  54 lines

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