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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class The_New_Republic(BasicNewsRecipe):
  4.     title = 'The New Republic'
  5.     __author__ = 'cix3'
  6.     language = 'en'
  7.     description = 'Intelligent, stimulating and rigorous examination of American politics, foreign policy and culture'
  8.     timefmt = ' [%b %d, %Y]'
  9.  
  10.     oldest_article = 7
  11.     max_articles_per_feed = 100
  12.     no_stylesheets = True
  13.  
  14.     remove_tags = [
  15.             dict(name='div', attrs={'class':['print-logo', 'print-site_name', 'img-left', 'print-source_url']}),
  16.             dict(name='hr', attrs={'class':'print-hr'}), dict(name='img')
  17.             ]
  18.  
  19.     feeds = [
  20.         ('Politics', 'http://www.tnr.com/rss/articles/Politics'),
  21.         ('Books and Arts', 'http://www.tnr.com/rss/articles/Books-and-Arts'),
  22.         ('Economy', 'http://www.tnr.com/rss/articles/Economy'),
  23.         ('Environment and Energy', 'http://www.tnr.com/rss/articles/Environment-%2526-Energy'),
  24.         ('Health Care', 'http://www.tnr.com/rss/articles/Health-Care'),
  25.         ('Metro Policy', 'http://www.tnr.com/rss/articles/Metro-Policy'),
  26.         ('World', 'http://www.tnr.com/rss/articles/World'),
  27.         ('Film', 'http://www.tnr.com/rss/articles/Film'),
  28.         ('Books', 'http://www.tnr.com/rss/articles/books'),
  29.         ('The Book', 'http://www.tnr.com/rss/book'),
  30.         ('Jonathan Chait', 'http://www.tnr.com/rss/blogs/Jonathan-Chait'),
  31.         ('The Plank', 'http://www.tnr.com/rss/blogs/The-Plank'),
  32.         ('The Treatment', 'http://www.tnr.com/rss/blogs/The-Treatment'),
  33.         ('The Spine', 'http://www.tnr.com/rss/blogs/The-Spine'),
  34.         ('The Vine', 'http://www.tnr.com/rss/blogs/The-Vine'),
  35.         ('The Avenue', 'http://www.tnr.com/rss/blogs/The-Avenue'),
  36.         ('William Galston', 'http://www.tnr.com/rss/blogs/William-Galston'),
  37.         ('Simon Johnson', 'http://www.tnr.com/rss/blogs/Simon-Johnson'),
  38.         ('Ed Kilgore', 'http://www.tnr.com/rss/blogs/Ed-Kilgore'),
  39.         ('Damon Linker', 'http://www.tnr.com/rss/blogs/Damon-Linker'),
  40.         ('John McWhorter', 'http://www.tnr.com/rss/blogs/John-McWhorter')
  41.             ]
  42.  
  43.     def print_version(self, url):
  44.         return url.replace('http://www.tnr.com/', 'http://www.tnr.com/print/')
  45.  
  46.