from calibre.web.feeds.news import BasicNewsRecipe class IndianExpress(BasicNewsRecipe): title = u'Indian Express' language = 'en_IN' __author__ = 'Krittika Goyal' oldest_article = 1 #days max_articles_per_feed = 25 encoding = 'cp1252' no_stylesheets = True remove_tags_before = dict(name='div', attrs={'class':'top_head'}) #remove_tags_after = dict(name='td', attrs={'class':'newptool1'}) remove_tags = [ dict(name='iframe'), dict(name='div', attrs={'class':['bookmarks_div', 'comment_box', 'bookmarks_div_bot', 'box']}), dict(name='div', attrs={'id':['footer', 'tab_innerhc', 'discussion', 'google_new']}), dict(name='a', attrs={'class':'nobdr'}), #dict(name='span', text=':'), ] feeds = [ ('Front Page', 'http://syndication.indianexpress.com/rss/33/front-page.xml'), ('Markets', 'http://syndication.indianexpress.com/rss/793/markets.xml'), ('Editorials', 'http://syndication.indianexpress.com/rss/35/editorials.xml'), ('Crime', 'http://syndication.indianexpress.com/rss/801/crime-&-justice.xml'), ('Cricket', 'http://syndication.indianexpress.com/rss/777/cricket.xml'), ('Health', 'http://syndication.indianexpress.com/rss/697/health.xml'), ('Asia', 'http://syndication.indianexpress.com/rss/790/asia.xml'), ('Politics', 'http://syndication.indianexpress.com/rss/799/politics.xml'), ('Mumbai', 'http://syndication.indianexpress.com/rss/707/mumbai.xml'), ('Op-Ed', 'http://syndication.indianexpress.com/rss/36/oped.xml'), ('Economy', 'http://syndication.indianexpress.com/rss/794/economy.xml'), ('Lifestyle', 'http://syndication.indianexpress.com/rss/713/lifestyle.xml'), ('Letters to the Editor', 'http://syndication.indianexpress.com/rss/40/letters-to-editor.xml'), ('Movie Reviews', 'http://syndication.indianexpress.com/rss/665/movie-reviews.xml'), ('Bollywood', 'http://syndication.indianexpress.com/rss/887/bollywood.xml'), ] def print_version(self, url): return url+'/0'