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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class Arbetaren_SE(BasicNewsRecipe):
  4.     title          = u'Arbetaren'
  5.     __author__            = 'Joakim Lindskog'
  6.     description           = 'Nyheter fr\xc3\xa5n Arbetaren'
  7.     publisher             = 'Arbetaren'
  8.     category              = 'news, politics, socialism, Sweden'
  9.     oldest_article        = 7
  10.     delay                 = 1
  11.     max_articles_per_feed = 100
  12.     no_stylesheets        = True
  13.     use_embedded_content  = False
  14.     encoding              = 'utf-8'
  15.     language              = 'sv'
  16.  
  17.     conversion_options = {
  18.                           'comment'   : description
  19.                         , 'tags'      : category
  20.                         , 'publisher' : publisher
  21.                         , 'language'  : language
  22.                         }
  23.  
  24.     keep_only_tags = [dict(name='div', attrs={'id':'article'})]
  25.     remove_tags_before = dict(name='div', attrs={'id':'article'})
  26.     remove_tags_after = dict(name='p',attrs={'id':'byline'})
  27.     remove_tags = [
  28.                      dict(name=['object','link','base']),
  29.                      dict(name='p', attrs={'class':'print'}),
  30.                      dict(name='a', attrs={'class':'addthis_button_compact'}),
  31.                      dict(name='script')
  32.                   ]
  33.  
  34.     feeds          = [(u'Nyheter', u'http://www.arbetaren.se/rss/arbetaren.rss?rev=123')]
  35.