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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Starson17'
  3. '''
  4. snopes.com
  5. '''
  6. from calibre.web.feeds.recipes import BasicNewsRecipe
  7.  
  8. class Snopes(BasicNewsRecipe):
  9.     title                  = 'Snopes'
  10.     __author__             = 'Starson17'
  11.     description            = 'Urban Legends'
  12.     oldest_article         = 21
  13.     max_articles_per_feed  = 100
  14.     no_stylesheets         = True
  15.     use_embedded_content   = False
  16.     encoding               = 'utf8'
  17.     publisher              = 'Snopes'
  18.     category               = 'news, '
  19.     language               = 'en'
  20.     publication_type       = 'newsportal'
  21.     remove_javascript = True
  22.     no_stylesheets        = True
  23.  
  24.     conversion_options = {
  25.                              'comments'        : description
  26.                             ,'tags'            : category
  27.                             ,'language'        : language
  28.                             ,'publisher'       : publisher
  29.                             ,'linearize_tables': True
  30.                          }
  31.  
  32.     keep_only_tags    = [
  33.                        dict(name='h1'),
  34.                        dict(name='div', attrs={'class':['article_text']}),
  35.                         ]
  36.  
  37.     feeds          = [
  38.                            ('Snopes', 'http://www.snopes.com/info/whatsnew.xml'),
  39.                            ]
  40.  
  41.     extra_css = '''
  42.                     h1{font-family:Trebuchet MS,Bookman Old Style,Arial;color:#75b570}
  43.                     h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:medium;}
  44.                     p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  45.                     body{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  46.                     '''
  47.