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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class AdvancedUserRecipe1295081935(BasicNewsRecipe):
  4.      title          = u'Mail & Guardian ZA News'
  5.      __author__     = '77ja65'
  6.      language = 'en_ZA'
  7.      oldest_article = 7
  8.      max_articles_per_feed = 30
  9.      no_stylesheets = True
  10.      masthead_url          =  'http://c1608832.cdn.cloudfiles.rackspacecloud.com/mg_logo.gif'
  11.      remove_tags_after = [dict(id='content')]
  12.  
  13.      feeds          = [
  14.          (u'National News', u'http://www.mg.co.za/rss/national'),
  15.          (u'Top Stories', u'http://www.mg.co.za/rss'),
  16.          (u'Africa News', u'http://www.mg.co.za/rss/africa'),
  17.          (u'Sport', u'http://www.mg.co.za/rss/sport'),
  18.          (u'Business', u'http://www.mg.co.za/rss/business'),
  19.          (u'And In Other News', u'http://www.mg.co.za/rss/and-in-other-news'),
  20.          (u'World News', u'http://www.mg.co.za/rss/world')
  21.          ]
  22.  
  23.      def print_version(self, url):
  24.            return url.replace('http://www.mg.co.za/article/',
  25.  'http://www.mg.co.za/printformat/single/')
  26.  
  27.      extra_css = '''
  28.                      h1{font-family:Arial,Helvetica,sans-serif; font-
  29.  weight:bold;font-size:large;}
  30.                      h2{font-family:Arial,Helvetica,sans-serif; font-
  31.  weight:normal;font-size:small;}
  32.                  '''
  33.