diff --git a/recipes/high_country_news.recipe b/recipes/high_country_news.recipe index 7a9d84aad6..15db60a957 100644 --- a/recipes/high_country_news.recipe +++ b/recipes/high_country_news.recipe @@ -8,21 +8,27 @@ Fetch High Country News from calibre.web.feeds.news import BasicNewsRecipe class HighCountryNews(BasicNewsRecipe): - title = u'High Country News' - description = u'News from the American West' - __author__ = 'Armin Geller' # 2012-01-28 - publisher = 'High Country News' - timefmt = ' [%a, %d %b %Y]' - language = 'en' - encoding = 'UTF-8' + title = u'High Country News' + description = u'News from the American West' + __author__ = 'Armin Geller' # 2012-01-31 + publisher = 'High Country News' + timefmt = ' [%a, %d %b %Y]' + language = 'en-Us' + encoding = 'UTF-8' publication_type = 'newspaper' oldest_article = 7 max_articles_per_feed = 100 - no_stylesheets = True - auto_cleanup = True - remove_javascript = True + no_stylesheets = True + auto_cleanup = True + remove_javascript = True use_embedded_content = False + masthead_url = 'http://www.hcn.org/logo.jpg' # 2012-01-31 AGe add + cover_source = 'http://www.hcn.org' # 2012-01-31 AGe add + def get_cover_url(self): # 2012-01-31 AGe add + cover_source_soup = self.index_to_soup(self.cover_source) + preview_image_div = cover_source_soup.find(attrs={'class':' portaltype-Plone Site content--hcn template-homepage_view'}) + return preview_image_div.div.img['src'] feeds = [ (u'Most recent', u'http://feeds.feedburner.com/hcn/most-recent'),