From 4c947784ce5f503f3da90135664074fb91391fa2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 Dec 2010 20:29:36 -0700 Subject: [PATCH] Fix #7887 (The news fetch for "Times of India" and "The Economic Times" (ENGLISH_ INDIA) not working.) --- resources/recipes/theeconomictimes_india.recipe | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/recipes/theeconomictimes_india.recipe b/resources/recipes/theeconomictimes_india.recipe index 92d2a64a70..d87eb91d0f 100644 --- a/resources/recipes/theeconomictimes_india.recipe +++ b/resources/recipes/theeconomictimes_india.recipe @@ -4,6 +4,7 @@ __copyright__ = '2008-2010, Darko Miletic ' economictimes.indiatimes.com ''' + from calibre.web.feeds.news import BasicNewsRecipe class TheEconomicTimes(BasicNewsRecipe): @@ -32,18 +33,17 @@ class TheEconomicTimes(BasicNewsRecipe): , 'language' : language } - keep_only_tags = [dict(attrs={'class':'printdiv'})] - remove_tags = [dict(name=['object','link','embed','iframe','base','table','meta'])] - remove_attributes = ['name'] + remove_tags_before = dict(name='h1') feeds = [(u'All articles', u'http://economictimes.indiatimes.com/rssfeedsdefault.cms')] def print_version(self, url): rest, sep, art = url.rpartition('/articleshow/') + return 'http://m.economictimes.com/PDAET/articleshow/' + art return 'http://economictimes.indiatimes.com/articleshow/' + art + '?prtpage=1' def get_article_url(self, article): - rurl = article.get('link', None) + rurl = article.get('guid', None) if (rurl.find('/quickieslist/') > 0) or (rurl.find('/quickiearticleshow/') > 0): return None return rurl