mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-09-29 15:31:08 -04:00
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
class TimesOfIndia(BasicNewsRecipe):
|
|
title = u'Times of India'
|
|
language = 'en_IN'
|
|
__author__ = 'Kovid Goyal'
|
|
oldest_article = 1 #days
|
|
max_articles_per_feed = 25
|
|
|
|
no_stylesheets = True
|
|
keep_only_tags = [dict(attrs={'class':'maintable12'})]
|
|
remove_tags = [
|
|
dict(style=lambda x: x and 'float' in x),
|
|
dict(attrs={'class':'prvnxtbg'}),
|
|
]
|
|
|
|
feeds = [
|
|
('Top Stories',
|
|
'http://timesofindia.indiatimes.com/rssfeedstopstories.cms'),
|
|
('India',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/-2128936835.cms'),
|
|
('World',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/296589292.cms'),
|
|
('Mumbai',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/-2128838597.cms'),
|
|
('Entertainment',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/1081479906.cms'),
|
|
('Cricket',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/4719161.cms'),
|
|
('Sunday TOI',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/1945062111.cms'),
|
|
('Life and Style',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/2886704.cms'),
|
|
('Business',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/1898055.cms'),
|
|
('Mad Mad World',
|
|
'http://timesofindia.indiatimes.com/rssfeeds/2178430.cms'),
|
|
('Most Read',
|
|
'http://timesofindia.indiatimes.com/rssfeedmostread.cms')
|
|
]
|
|
def print_version(self, url):
|
|
return url + '?prtpage=1'
|
|
|
|
def preprocess_html(self, soup):
|
|
return soup
|