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

  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3.  
  4. __license__ = 'GPL 3'
  5. __copyright__ = 'zotzo'
  6.  
  7. """
  8. http://www.prostamerika.com/
  9. """
  10.  
  11. from calibre.web.feeds.news import BasicNewsRecipe
  12.  
  13.  
  14. class ProstAmerika(BasicNewsRecipe):
  15.     title = 'Prost Amerika'
  16.     language = 'en'
  17.     __author__ = 'rylsfan'
  18.     #authors =
  19.     description = 'Seattle soccer with a European accent. News, features, and match reports.'
  20.     publisher =  'ProstAmerika' # 4464 fremont avenue n, # 209, Seattle, 98103, United States
  21.     category = 'Sports'
  22.  
  23.     oldest_article = 7
  24.     max_articles_per_feed = 100
  25.  
  26.     cover_url = 'http://img17.imageshack.us/img17/9498/prostamerika.jpg'
  27.     masthead_url = 'http://www.prostamerika.com/soundersfc/wp-content/uploads/2011/02/PASoccer_taglinewhole.jpg'
  28.  
  29.     encoding = 'utf-8'
  30.  
  31.     no_stylesheets = True
  32.     use_embedded_content = False
  33.     remove_javascript = True
  34.  
  35.     feeds =[
  36.                (u'Cascadia',   u'http://www.prostamerika.com/category/localfootball/feed/' ),
  37.                (u'MLS',        u'http://www.prostamerika.com/category/mls/feed/'),
  38.                (u'EPL',        u'http://www.prostamerika.com/category/epl/feed/'),
  39.                (u'World',      u'http://www.prostamerika.com/category/international-soccer/feed/'),
  40.                (u'Fan Culture',u'http://www.prostamerika.com/category/fan-culture/feed/')
  41.  
  42.            ]
  43.  
  44.     keep_only_tags = [dict(name='div', attrs={'id':'maincontent'})]
  45.     remove_tags =  [
  46.                        {'class':'tweetmeme_button'},
  47.                        {'class':'wp-caption-text'}
  48.                    ]
  49.  
  50.  
  51.     remove_tags_after =[
  52.                            {'class':'tweetmeme_button'}
  53.                        ]
  54.  
  55.     extra_css = '''
  56.                h1{font-family:Didot,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  57.                h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  58.                p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  59.                body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  60.                 '''
  61.  
  62.     def preprocess_html(self, soup):
  63.         return self.adeify_images(soup)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.