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

  1. #!/usr/bin/env  python
  2. __license__ = 'GPL 3'
  3. __copyright__ = 'zotzo'
  4. __docformat__ = 'restructuredtext en'
  5. '''
  6. http://wvhooligan.com/
  7. '''
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9. #import re
  10.  
  11. class wvHooligan(BasicNewsRecipe):
  12.     authors = u'Drew Epperley'
  13.     __author__ = 'rylsfan'
  14.     language = 'en'
  15.     version = 2
  16.  
  17.     title = u'WV Hooligan'
  18.     publisher = u'Drew Epperley'
  19.     publication_type = 'Blog'
  20.     category = u'Soccer'
  21.     description = u'A look at Major League Soccer (MLS) through the eyes of a MLS writer and fan.'
  22.  
  23.     cover_url = 'http://wvhooligan.com/wp-content/themes/urbanelements/images/logo3.png'
  24.  
  25.     oldest_article = 15
  26.     max_articles_per_feed = 150
  27.     use_embedded_content = True
  28.     no_stylesheets = True
  29.     remove_javascript = True
  30.     encoding = 'utf8'
  31.  
  32.     conversion_options = {
  33.                           'comment'   : description
  34.                         , 'tags'      : category
  35.                         , 'publisher' : publisher
  36.                         , 'language'  : language
  37.                         }
  38.  
  39.     remove_tags =  [
  40.                        {'class': 'feedflare'},
  41.                        {'class': 'tweetmeme_button'},
  42.                    ]
  43.  
  44.     def preprocess_html(self, soup):
  45.        return self.adeify_images(soup)
  46.  
  47.     feeds =[
  48.                (u'Stories', u'http://feeds2.feedburner.com/wvhooligan'),
  49.                (u'MLS', u'http://wvhooligan.com/category/mls/feed/'),
  50.                (u'MLS Power Rankings', u'http://wvhooligan.com/category/power-rankings/feed/'),
  51.                (u'MLS Expansion', u'http://wvhooligan.com/category/mls/expansion-talk/feed/'),
  52.                (u'US National Team', u'http://wvhooligan.com/category/us-national-team/feed/'),
  53.                (u'College', u'http://wvhooligan.com/category/college-soccer/feed/'),
  54.            ]
  55.  
  56.     extra_css = '''
  57.                h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  58.                h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  59.                p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  60.                body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  61.                '''
  62.