From 9466f30981113219e045f302071340de402309c0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 8 Apr 2009 20:21:45 -0700 Subject: [PATCH] Fix #2240 (New Yorker download has issues) --- src/calibre/web/feeds/recipes/recipe_new_yorker.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/calibre/web/feeds/recipes/recipe_new_yorker.py b/src/calibre/web/feeds/recipes/recipe_new_yorker.py index 628919ce71..3ebc275d99 100644 --- a/src/calibre/web/feeds/recipes/recipe_new_yorker.py +++ b/src/calibre/web/feeds/recipes/recipe_new_yorker.py @@ -42,3 +42,12 @@ class NewYorker(BasicNewsRecipe): def print_version(self, url): return url + '?printable=true' + + def postprocess_html(self, soup, x): + body = soup.find('body') + if body: + html = soup.find('html') + if html: + body.extract() + html.insert(-1, body) + return soup