From d977bf92014efb0ca5de4040bbeb19ea2033512c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 20 Jan 2016 14:34:30 +0530 Subject: [PATCH] Remove no longer working Hindustan Times Recipe --- recipes/hindustan_times.recipe | 51 ---------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 recipes/hindustan_times.recipe diff --git a/recipes/hindustan_times.recipe b/recipes/hindustan_times.recipe deleted file mode 100644 index ab7a276aa0..0000000000 --- a/recipes/hindustan_times.recipe +++ /dev/null @@ -1,51 +0,0 @@ -from calibre.web.feeds.news import BasicNewsRecipe - -class HindustanTimes(BasicNewsRecipe): - title = u'Hindustan Times' - language = 'en_IN' - __author__ = 'Krittika Goyal' - oldest_article = 1 # days - max_articles_per_feed = 25 - use_embedded_content = False - - no_stylesheets = True - auto_cleanup = True - - feeds = [ - ('News', - 'http://feeds.hindustantimes.com/HT-HomePage-TopStories'), - ('India', - 'http://feeds.hindustantimes.com/HT-India'), - ('World', - 'http://feeds.hindustantimes.com/HT-World'), - ('Business', - 'http://feeds.hindustantimes.com/HT-Business'), - ('Fashion', - 'http://feeds.hindustantimes.com/HT-Fashion'), - ('Sex & Relationships', - 'http://feeds.hindustantimes.com/HT-Sexandrelationships'), - ('Travel', - 'http://feeds.hindustantimes.com/HT-Travel'), - ('Books', - 'http://feeds.hindustantimes.com/HT-Books'), -] - - def get_article_url(self, article): - ''' - HT uses a variant of the feedportal RSS ad display mechanism - ''' - url = article.get('feedburner_origlink', None) - if url is not None: - idx = url.find('0L0S') - url = url[idx:] - encoding = {'0B': '.', '0C': '/', '0A': '0', '0F': '=', '0G': '&', - '0D': '?', '0E': '-', '0N': '.com', '0L': 'http://', '0S': - 'www.'} - for k, v in encoding.iteritems(): - url = url.replace(k, v) - if url.endswith('/story01.htm'): - url = url.rpartition('/')[0] - return url - return article.get('link', None) - -