From 0a840e9e2b5af4a3ba35665b74b76d17abb341d0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Sep 2009 09:16:09 -0600 Subject: [PATCH] Fix #3399 (Problem with recipe for The Economist?) --- src/calibre/web/feeds/recipes/recipe_economist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/web/feeds/recipes/recipe_economist.py b/src/calibre/web/feeds/recipes/recipe_economist.py index c88554ad27..de557b9cf7 100644 --- a/src/calibre/web/feeds/recipes/recipe_economist.py +++ b/src/calibre/web/feeds/recipes/recipe_economist.py @@ -61,8 +61,8 @@ class Economist(BasicNewsRecipe): continue a = tag.find('a', href=True) if a is not None: - url=a['href'].replace('displaystory', 'PrinterFriendly') - if url.startswith('/'): + url=a['href'].replace('displaystory', 'PrinterFriendly').strip() + if url.startswith('/') or url.startswith('PrinterF'): url = 'http://www.economist.com' + url try: subtitle = tag.previousSibling.contents[0].contents[0]