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

  1.  
  2. from calibre.web.feeds.news import BasicNewsRecipe
  3.  
  4. class Neowin(BasicNewsRecipe):
  5.     title                 = u'Neowin.net'
  6.     oldest_article        = 5
  7.     language              = 'en'
  8.     description           = 'News from IT'
  9.     publisher             = 'Neowin'
  10.     category              = 'news, IT, Microsoft, Apple, hardware, software, games'
  11.     __author__            = 'Darko Miletic'
  12.     max_articles_per_feed = 100
  13.     no_stylesheets        = True
  14.     encoding              = 'utf8'
  15.  
  16.     conversion_options = {
  17.                              'tags'      : category
  18.                             ,'language'  : language
  19.                             ,'comments'  : description
  20.                             ,'publisher' : publisher
  21.                          }
  22.  
  23.     keep_only_tags     = [dict(name='div', attrs={'id':'article'})]
  24.     remove_tags_after = dict(name='div', attrs={'id':'tag-bar'})
  25.  
  26.     remove_tags        = [
  27.                             dict(name=['base','object','link','iframe'])
  28.                            ,dict(name='div', attrs={'id':'tag-bar'})
  29.                          ]
  30.  
  31.     feeds          = [
  32.                         (u'Software' , u'http://www.neowin.net/news/rss/software' )
  33.                        ,(u'Gaming'   , u'http://www.neowin.net/news/rss/gaming'   )
  34.                        ,(u'Microsoft', u'http://www.neowin.net/news/rss/microsoft')
  35.                        ,(u'Apple'    , u'http://www.neowin.net/news/rss/apple'    )
  36.                        ,(u'Editorial', u'http://www.neowin.net/news/rss/editorial')
  37.                      ]
  38.     def image_url_processor(cls, baseurl, url):
  39.         return url
  40.  
  41.