diff --git a/resources/images/news/thestar.png b/resources/images/news/thestar.png new file mode 100644 index 0000000000..94974bca7a Binary files /dev/null and b/resources/images/news/thestar.png differ diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 926580bba1..b48b4054ea 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -58,6 +58,7 @@ recipe_modules = ['recipe_' + r for r in ( 'esquire', 'livemint', 'thedgesingapore', 'darknet', 'rga', 'intelligencer', 'theoldfoodie', 'hln_be', 'honvedelem', 'the_new_republic', 'philly', 'salon', 'tweakers', 'smashing', + 'thestar', )] diff --git a/src/calibre/web/feeds/recipes/recipe_thestar.py b/src/calibre/web/feeds/recipes/recipe_thestar.py new file mode 100644 index 0000000000..99f024e964 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_thestar.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +www.thestar.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class TheTorontoStar(BasicNewsRecipe): + title = 'The Toronto Star' + __author__ = 'Darko Miletic' + description = "Canada's largest daily newspaper" + oldest_article = 2 + language = 'en_CA' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + 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' + extra_css = ' .headlineArticle{font-size: x-large; font-weight: bold} .navbar{text-align:center} ' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'publisher' : publisher + } + + keep_only_tags = [dict(name='div', attrs={'id':'AssetWebPart1'})] + remove_attributes= ['style'] + + feeds = [ + (u'News' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=296' ) + ,(u'Opinions' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=311' ) + ,(u'Business' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=294' ) + ,(u'Sports' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=295' ) + ,(u'Entertainment', u'http://www.thestar.com/rss/0?searchMode=Query&categories=296' ) + ,(u'Living' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=296' ) + ,(u'Travel' , u'http://www.thestar.com/rss/82858?searchMode=Lineup' ) + ,(u'Science' , u'http://www.thestar.com/rss/82848?searchMode=Query&categories=300') + ] + + def print_version(self, url): + return url.replace('/article/','/printArticle/') +