From 22b917ccc559e008c25cde85e48069eee4cafe21 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 May 2010 11:22:42 -0600 Subject: [PATCH] Improved Atlantic --- resources/recipes/atlantic.recipe | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/recipes/atlantic.recipe b/resources/recipes/atlantic.recipe index c6db016010..a41a931e37 100644 --- a/resources/recipes/atlantic.recipe +++ b/resources/recipes/atlantic.recipe @@ -5,7 +5,7 @@ __copyright__ = '2008, Kovid Goyal ' ''' theatlantic.com ''' -import string +import string, re from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag, NavigableString @@ -23,6 +23,8 @@ class TheAtlantic(BasicNewsRecipe): remove_tags = [dict(id=['header', 'printAds', 'pageControls'])] no_stylesheets = True + preprocess_regexps = [(re.compile(r'', re.DOTALL), lambda m: '')] + def print_version(self, url): return url.replace('/archive/', '/print/')