home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / politiken_dk.recipe < prev    next >
Text File  |  2011-09-09  |  2KB  |  56 lines

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. politiken.dk
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  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 = {
  27.                           'comment'  : description
  28.                         , 'tags'     : category
  29.                         , 'publisher': publisher
  30.                         , 'language' : language
  31.                         }
  32.  
  33.     feeds              = [
  34.                             (u'Tophistorier'   , u'http://politiken.dk/rss/tophistorier.rss')
  35.                            ,(u'Seneste nyt'    , u'http://politiken.dk/rss/senestenyt.rss')
  36.                            ,(u'Mest laeste'    , u'http://politiken.dk/rss/mestlaeste.rss')
  37.                            ,(u'Danmark'        , u'http://politiken.dk/rss/indland.rss')
  38.                            ,(u'Politik'        , u'http://politiken.dk/rss/politik.rss')
  39.                            ,(u'Klima'          , u'http://politiken.dk/rss/klima.rss')
  40.                            ,(u'Internationalt' , u'http://politiken.dk/rss/udland.rss')
  41.                            ,(u'Erhverv'        , u'http://politiken.dk/rss/erhverv.rss')
  42.                            ,(u'Kultur'         , u'http://politiken.dk/rss/kultur.rss')
  43.                            ,(u'Sport'          , u'http://politiken.dk/rss/sport.rss')
  44.                            ,(u'Uddannelse'     , u'http://politiken.dk/rss/uddannelse.rss')
  45.                            ,(u'Videnskab'      , u'http://politiken.dk/rss/videnskab.rss')
  46.                           ]
  47.     remove_tags_before = dict(name='h1')
  48.     remove_tags        = [
  49.                             dict(name=['object','link'])
  50.                            ,dict(name='div',attrs={'class':'footer'})
  51.                          ]
  52.  
  53.     def print_version(self, url):
  54.         return url + '?service=print'
  55.  
  56.