From f22b9453ae5248670079646e48493c7b893f93ff Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 27 Oct 2009 12:32:55 -0600 Subject: [PATCH] New recipe for Variety by Darko Miletic --- resources/images/news/variety.png | Bin 0 -> 332 bytes resources/recipes/variety.recipe | 46 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 resources/images/news/variety.png create mode 100644 resources/recipes/variety.recipe diff --git a/resources/images/news/variety.png b/resources/images/news/variety.png new file mode 100644 index 0000000000000000000000000000000000000000..5bb127d4b42851491ac8d77b0e5b4de02998f3d8 GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*VRoKjC0#}JFtXD2!G9Z=w4VZYq|ySQqDRESE2 zcBkW%#;F|tw{`^ue!p`=IJWKRZ1I~1e(APNU(q;YZ{LoS_J@}>t`Y6ES=Ka9=|WLO zG8@~3O%1P(+3_4$w?JL}!OjCVOGIQeJr4d}u%r30q>Aqx{z+}soAf?T-COWmbF$`~ z-yo-|mbgZgq$HN4S|t~y0x1R~0|QH4LjzqS^AJNLDFo9^0`;w~;)WG2B>gTe~DWM4fG%#;N literal 0 HcmV?d00001 diff --git a/resources/recipes/variety.recipe b/resources/recipes/variety.recipe new file mode 100644 index 0000000000..7321e0ad33 --- /dev/null +++ b/resources/recipes/variety.recipe @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +www.variety.com +''' + +from calibre.web.feeds.recipes import BasicNewsRecipe + +class Variety(BasicNewsRecipe): + title = 'Variety' + __author__ = 'Darko Miletic' + description = 'Breaking entertainment movie news, movie reviews, entertainment industry events, news and reviews from Cannes, Oscars, and Hollywood awards. Featuring box office charts, archives and more.' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'cp1252' + publisher = 'Red Business Information' + category = 'Entertainment Industry News, Daily Variety, Movie Reviews, TV, Awards, Oscars, Cannes, Box Office, Hollywood' + language = 'en' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + remove_tags = [dict(name=['object','link','map'])] + + keep_only_tags = [dict(name='div', attrs={'id':'article'})] + + feeds = [(u'News & Articles', u'http://feeds.feedburner.com/variety/headlines' )] + + def print_version(self, url): + rpt = url.rpartition('?')[0] + artid = rpt.rpartition('/')[2] + catidr = url.rpartition('categoryid=')[2] + catid = catidr.partition('&')[0] + return 'http://www.variety.com/index.asp?layout=print_story&articleid=' + artid + '&categoryid=' + catid + + def get_article_url(self, article): + return article.get('feedburner_origlink', None) +