#!/usr/bin/env python # encoding: utf-8 __license__ = 'GPL 3' __copyright__ = 'zotzo' """ http://www.prostamerika.com/ """ from calibre.web.feeds.news import BasicNewsRecipe class ProstAmerika(BasicNewsRecipe): title = 'Prost Amerika' language = 'en' __author__ = 'rylsfan' # authors = description = 'Seattle soccer with a European accent. News, features, and match reports.' # 4464 fremont avenue n, # 209, Seattle, 98103, United States publisher = 'ProstAmerika' category = 'Sports' oldest_article = 7 max_articles_per_feed = 100 cover_url = 'http://img17.imageshack.us/img17/9498/prostamerika.jpg' masthead_url = 'http://www.prostamerika.com/soundersfc/wp-content/uploads/2011/02/PASoccer_taglinewhole.jpg' encoding = 'utf-8' no_stylesheets = True use_embedded_content = False remove_javascript = True feeds = [ (u'Cascadia', u'http://www.prostamerika.com/category/localfootball/feed/'), (u'MLS', u'http://www.prostamerika.com/category/mls/feed/'), (u'EPL', u'http://www.prostamerika.com/category/epl/feed/'), (u'World', u'http://www.prostamerika.com/category/international-soccer/feed/'), (u'Fan Culture', u'http://www.prostamerika.com/category/fan-culture/feed/') ] keep_only_tags = [dict(name='div', attrs={'id': 'maincontent'})] remove_tags = [ {'class': 'tweetmeme_button'}, {'class': 'wp-caption-text'} ] remove_tags_after = [ {'class': 'tweetmeme_button'} ] extra_css = ''' h1{font-family:Didot,Helvetica,sans-serif; font-weight:bold;font-size:large;} h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;} p{font-family:Arial,Helvetica,sans-serif;font-size:small;} body{font-family:Helvetica,Arial,sans-serif;font-size:small;} ''' def preprocess_html(self, soup): return self.adeify_images(soup)