From 08c7ed70fae8c76e628e7b6290309051a83b4a88 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Mar 2010 07:54:12 +0530 Subject: [PATCH] New York Post by Darko Miletic --- resources/images/news/nypost.png | Bin 0 -> 400 bytes resources/recipes/nypost.recipe | 36 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 resources/images/news/nypost.png create mode 100644 resources/recipes/nypost.recipe diff --git a/resources/images/news/nypost.png b/resources/images/news/nypost.png new file mode 100644 index 0000000000000000000000000000000000000000..f9a93cfbb3dfcb73e2d8c877b32b870ee497f203 GIT binary patch literal 400 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*VRoSmL7jv*GO*9HgjwJPweK32VPc4XeQxjFBh z-5qM5JySB zc@`L|2lb|$&R(lKouyp9dP4isDaY>ZR=Al}#eQSHp-0;i4~CAv79QJXwJez+QXKVi z_7~nXwsQBiqG{W9PB76>tzKX8Jk2w-oc-kF$t5@5_s=)4i>>7s@?Q1rd}YbRpI7Z? zCMExu)<1J-bLKI2tyh<~x&EjT26{rZ#5JNMC9x#cD!C{XNHG{07#ipr80#9Dh8UPz znHpJ{SZEuVS{WGpe-LMnq9HdwB{QuOp}{1?$iT|T#L5(?!3?Ou?Nfa)Py>UftDnm{ Hr-UW|jR=gl literal 0 HcmV?d00001 diff --git a/resources/recipes/nypost.recipe b/resources/recipes/nypost.recipe new file mode 100644 index 0000000000..694f5b04d2 --- /dev/null +++ b/resources/recipes/nypost.recipe @@ -0,0 +1,36 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +nypost.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class NYPost(BasicNewsRecipe): + title = 'New York Post' + __author__ = 'Darko Miletic' + description = 'Daily newspaper' + publisher = 'NYP Holdings, Inc.' + category = 'news, politics, USA' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'en' + masthead_url = 'http://www.nypost.com/rw/SysConfig/WebPortal/nypost/images/nyp_logo_230x32.gif' + extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + keep_only_tags=[dict(name='div', attrs={'id':'story'})] + + feeds = [(u'Articles', u'http://www.nypost.com/rss/all_section.xml')] + + def print_version(self, url): + return url.replace('nypost.com/p/','nypost.com/f/print/')