mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Remove no longer working Hindustan Times Recipe
This commit is contained in:
parent
17ddcaa9df
commit
d977bf9201
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user