From 43f484f3e76b5f3b885b91e16364000be6bc761f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Nov 2011 08:45:44 +0530 Subject: [PATCH] Fix Salon.com --- recipes/salon.recipe | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/salon.recipe b/recipes/salon.recipe index c421ab094d..5659e2f5c4 100644 --- a/recipes/salon.recipe +++ b/recipes/salon.recipe @@ -11,17 +11,16 @@ from calibre.web.feeds.news import BasicNewsRecipe class Salon_com(BasicNewsRecipe): title = 'Salon.com' - __author__ = 'cix3' + __author__ = 'Kovid Goyal' description = 'Salon.com - Breaking news, opinion, politics, entertainment, sports and culture.' timefmt = ' [%b %d, %Y]' language = 'en' oldest_article = 7 max_articles_per_feed = 100 - - remove_tags = [dict(name='div', attrs={'class':['ad_content', 'clearfix']}), dict(name='hr'), dict(name='img')] - - remove_tags_before = dict(name='h2') + auto_cleanup = True + auto_cleanup_keep = '//div[@class="art"]' + remove_empty_feeds = True feeds = [ ('News & Politics', 'http://feeds.salon.com/salon/news'), @@ -40,5 +39,5 @@ class Salon_com(BasicNewsRecipe): ] def print_version(self, url): - return url.replace('/index.html', '/print.html') + return url + '/print/'