diff --git a/recipes/thestar.recipe b/recipes/thestar.recipe index f667b86472..59c3b43c6b 100644 --- a/recipes/thestar.recipe +++ b/recipes/thestar.recipe @@ -1,7 +1,5 @@ -#!/usr/bin/env python - __license__ = 'GPL v3' -__copyright__ = '2009, Darko Miletic ' +__copyright__ = '2009-2013, Darko Miletic ' ''' www.thestar.com ''' @@ -11,18 +9,17 @@ from calibre.web.feeds.news import BasicNewsRecipe class TheTorontoStar(BasicNewsRecipe): title = 'The Toronto Star' __author__ = 'Darko Miletic' - description = "Canada's largest daily newspaper" + description = "Thestar.com is Canada's largest online news site. Stay current with our sports, business entertainment news and more from the Toronto Star and thestar.com" oldest_article = 2 language = 'en_CA' max_articles_per_feed = 100 no_stylesheets = True - #auto_cleanup = True - #auto_cleanup_keep = '//div[@class="topsContent topsContentActive"]' use_embedded_content = False delay = 2 publisher = 'The Toronto Star' category = "Toronto Star,Canada's largest daily newspaper,breaking news,classifieds,careers,GTA,Toronto Maple Leafs,sports,Toronto,news,editorial,The Star,Ontario,information,columnists,business,entertainment,births,deaths,automotive,rentals,weather,archives,Torstar,technology,Joseph Atkinson" encoding = 'utf-8' + masthead_url = 'http://www.thestar.com/etc/designs/thestar/images/general/logoLrg.png' conversion_options = { 'comments' : description @@ -30,23 +27,18 @@ class TheTorontoStar(BasicNewsRecipe): ,'publisher' : publisher } - #keep_only_tags = [dict(name='div', attrs={'class':'ts-article'})] - #remove_tags_before = dict(name='div',attrs={'id':'ts-article_header'}) + remove_tags_before = dict(name='div',attrs={'class':'article-headline'}) feeds = [ - (u'News' , u'http://www.thestar.com/rss/?categories=293' ) - ,(u'Opinion' , u'http://www.thestar.com/rss/?categories=303' ) - ,(u'Business' , u'http://www.thestar.com/rss/?categories=294' ) - ,(u'Sports' , u'http://www.thestar.com/rss/?categories=295' ) - ,(u'Entertainment', u'http://www.toronto.com/rss?categories=6298' ) - ,(u'Living' , u'http://www.thestar.com/rss/?categories=297' ) - ,(u'Travel' , u'http://www.thestar.com/rss/list/1042246?' ) - ,(u'Science' , u'http://www.thestar.com/rss?categories=6481') + (u'News' , u'http://www.thestar.com/feeds.articles.news.rss' ) + ,(u'Opinion' , u'http://www.thestar.com/feeds.articles.opinion.rss' ) + ,(u'Business' , u'http://www.thestar.com/feeds.articles.business.rss' ) + ,(u'Sports' , u'http://www.thestar.com/feeds.articles.sports.rss' ) + ,(u'Entertainment', u'http://www.thestar.com/feeds.articles.entertainment.rss' ) + ,(u'Living' , u'http://www.thestar.com/feeds.articles.life.rss' ) + ,(u'Travel' , u'http://www.thestar.com/feeds.articles.life.travel.rss' ) + ,(u'Technology' , u'http://www.thestar.com/feeds.articles.life.technology.rss') ] def print_version(self, url): - artl = url.rpartition('--')[0] - artid = artl.rpartition('/')[2] - return 'http://www.thestar.com/printarticle/' + artid - - + return url.replace('.html', '.print.html')