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

  1. #!/usr/bin/env  python
  2. __license__ = 'GPL 3'
  3. __copyright__ = 'zotzo'
  4. __docformat__ = 'restructuredtext en'
  5. '''
  6. http://www.epltalk.com
  7. '''
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10.  
  11. class EPLTalkRecipe(BasicNewsRecipe):
  12.     language = 'en'
  13.     version = 2
  14.     __author__ = 'rylsfan'
  15.  
  16.     title = u'EPL Talk'
  17.     publisher = u'The Gaffer'
  18.     publication_type = 'Blog'
  19.     category = u'Soccer'
  20.     description = u'News and Analysis from the English Premier League'
  21.     cover_url = 'http://bit.ly/hJxZPu'
  22.  
  23.     oldest_article = 3
  24.     max_articles_per_feed = 100
  25.     use_embedded_content = True
  26.     remove_javascript = True
  27.     encoding = 'utf8'
  28.  
  29.     conversion_options = {
  30.                           'comment'   : description
  31.                         , 'tags'      : category
  32.                         , 'publisher' : publisher
  33.                         , 'language'  : language
  34.                         }
  35.  
  36.     remove_tags =  [
  37.                        {'class': 'feedflare'},
  38.                        {'class': 'tweetmeme_button'},
  39.                        {'class': 'eplrelated'},
  40.                        {'p': 'Related posts:<ol>'},
  41.                    ]
  42.  
  43.     def preprocess_html(self, soup):
  44.        return self.adeify_images(soup)
  45.  
  46.     feeds =[
  47.                (u'EPL Talk', u'http://feeds.feedburner.com/EPLTalk'),
  48.                (u'MLS Talk', u'http://feeds.feedburner.com/majorleaguesoccertalksite'),
  49.                #(),
  50.                #(),
  51.                #(),
  52.            ]
  53.  
  54.     extra_css = '''
  55.            h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  56.            h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  57.            p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  58.            body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  59.                '''
  60.