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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2009, Rick Kellogg'
  5. '''
  6. Infoworld.com
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class Engadget(BasicNewsRecipe):
  12.     title                 = u'Infoworld.com'
  13.     __author__            = 'Rick Kellogg'
  14.     description           = 'news'
  15.     language = 'en'
  16.     oldest_article        = 7
  17.     max_articles_per_feed = 100
  18.     no_stylesheets        = True
  19.     use_embedded_content  = False
  20.  
  21.     remove_tags =   [ dict(name='div', attrs={'class':["articleTools clearfix","relatedContent","pagination clearfix","addResources"]}),
  22.               dict(name='div', attrs={'id':["post-socialPromoBlock"]})]
  23.  
  24.     keep_only_tags = [dict(name='div', attrs={'class':["article"]})]
  25.  
  26.     feeds = [ (u'Top Tech Stories', u'http://infoworld.com/homepage/feed'),
  27.               (u'Today\'s Tech Headlines', u'http://www.infoworld.com/news/feed') ]
  28.  
  29.     def get_article_url(self, article):
  30.  
  31.         url = article.get('link', None)
  32.  
  33.         return url
  34.  
  35.  
  36.