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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. information.dk
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class Information_dk(BasicNewsRecipe):
  11.     title                 = 'Information - Denmark'
  12.     __author__            = 'Darko Miletic'
  13.     description           = 'News from Denmark'
  14.     publisher             = 'information.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              = 'utf8'
  22.     language              = 'da'
  23.  
  24.     conversion_options = {
  25.                           'comment'  : description
  26.                         , 'tags'     : category
  27.                         , 'publisher': publisher
  28.                         , 'language' : language
  29.                         }
  30.  
  31.     feeds              = [
  32.                             (u'Nyheder fra'               , u'http://www.information.dk/feed')
  33.                            ,(u'Bedst lige nu'             , u'http://www.information.dk/bedstligenu/feed')
  34.                            ,(u'Politik og internationalt' , u'http://www.information.dk/politik/feed')
  35.                            ,(u'Kunst og kultur'           , u'http://www.information.dk/kultur/feed')
  36.                            ,(u'Moderne Tider'             , u'http://www.information.dk/modernetider/feed')
  37.                            ,(u'Klima'                     , u'http://www.information.dk/klima/feed')
  38.                            ,(u'Opinion'                   , u'http://www.information.dk/opinion/feed')
  39.                            ,(u'Literatur'                 , u'http://www.information.dk/litteratur/feed')
  40.                            ,(u'Film'                      , u'http://www.information.dk/film/feed')
  41.                            ,(u'Kunst'                     , u'http://www.information.dk/kunst/feed')
  42.                           ]
  43.  
  44.     remove_tags_before = dict(name='h1',attrs={'class':'print-title'})
  45.     remove_tags_after  = dict(name='div',attrs={'class':'print-footer'})
  46.     remove_tags        = [dict(name=['object','link'])]
  47.  
  48.     def print_version(self, url):
  49.         return url.replace('information.dk/','information.dk/print/')
  50.  
  51.