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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2. import re
  3.  
  4. class Skeptic(BasicNewsRecipe):
  5.     title          = u'The Skeptic'
  6.     description         = 'Discussions with leading experts and investigation of fringe science and paranormal claims.'
  7.     language       = 'en'
  8.     __author__     = 'Starson17'
  9.     oldest_article = 31
  10.     cover_url           = 'http://www.skeptricks.com/images/Skeptic_Magazine.jpg'
  11.     remove_empty_feeds    = True
  12.     remove_javascript   = True
  13.     max_articles_per_feed = 50
  14.     no_stylesheets = True
  15.  
  16.     remove_tags = [dict(name='div', attrs={'class':['Introduction','divider']}),
  17.                   dict(name='div', attrs={'id':['feature', 'podcast']}),
  18.                   dict(name='div', attrs={'id':re.compile(r'follow.*', re.DOTALL|re.IGNORECASE)}),
  19.                   dict(name='hr'),
  20.                   ]
  21.  
  22.  
  23.     feeds = [
  24.             ('The Skeptic', 'http://www.skeptic.com/feed'),
  25.             ('E-Skeptic', 'http://www.skeptic.com/eskeptic'),
  26.             ('All-SkepticBlog', 'http://skepticblog.org/feed'),
  27.             ('Brian Dunning', 'http://skepticblog.org/author/dunning/feed/'),
  28.             ('Daniel Loxton', 'http://skepticblog.org/author/loxton/feed/'),
  29.             ('Kirsten Sanford', 'http://skepticblog.org/author/sanford/feed/'),
  30.             ('Mark Edward', 'http://skepticblog.org/author/edward/feed/'),
  31.             ('Michael Shermer', 'http://skepticblog.org/author/shermer/feed/'),
  32.             ('Phil Plait', 'http://skepticblog.org/author/plait/feed/'),
  33.             ('Ryan Johnson', 'http://skepticblog.org/author/johnson/feed/'),
  34.             ('Steven Novella', 'http://skepticblog.org/author/novella/feed/'),
  35.             ('Yau-Man Chan', 'http://skepticblog.org/author/chan/feed/'),
  36.             ]
  37.  
  38.     def get_browser(self):
  39.         br = BasicNewsRecipe.get_browser(self)
  40.         br.addheaders = [('Accept', 'text/html')]
  41.         return br
  42.  
  43.     extra_css = '''
  44.                     h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  45.                     h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  46.                     p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  47.                     body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  48.         '''
  49.  
  50.