From 94d0473c9780c9c7141736c2ad7877ce05705064 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 19 Feb 2009 12:41:34 -0800 Subject: [PATCH] Fix #1894 (The Economist news feed not working) --- src/calibre/web/feeds/recipes/recipe_economist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/web/feeds/recipes/recipe_economist.py b/src/calibre/web/feeds/recipes/recipe_economist.py index 3dfaa7257d..403450e833 100644 --- a/src/calibre/web/feeds/recipes/recipe_economist.py +++ b/src/calibre/web/feeds/recipes/recipe_economist.py @@ -60,8 +60,11 @@ 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 = 'http://www.economist.com' + url article = dict(title=text, - url='http://www.economist.com'+a['href'].replace('displaystory', 'PrinterFriendly'), + url = url, description='', content='', date='') feeds[key].append(article)