From 05bfde3f256a10a92ffbd5a4eac923be01b106dc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Jan 2012 09:00:45 +0530 Subject: [PATCH] Fix #915555 (New recipe for news portal Novi list) --- recipes/icons/novilist_portal_hr.png | Bin 0 -> 944 bytes recipes/novilist_portal_hr.recipe | 49 +++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 recipes/icons/novilist_portal_hr.png create mode 100644 recipes/novilist_portal_hr.recipe diff --git a/recipes/icons/novilist_portal_hr.png b/recipes/icons/novilist_portal_hr.png new file mode 100644 index 0000000000000000000000000000000000000000..423470c1ddbd6b79580673528dd668fa88ca32c5 GIT binary patch literal 944 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl4m>B|mLR=Zvy=PeW;s5{tE1vvj zSpVVO&woG#qhK@yMo0)GD=ugPdNteA#WAE}j&DCB-vI?4riGjS*H<>|@`>K6K8b5$ zkrNB!%7X#dix}H}3d~ivk;phTQ}d&)u#to6{K<@`w$7rtQcpFQ5@6^SBO zo(A4l?u~8TV4F2@-m-7?7lN&>{|uh>nm_i+o`vE942-{`HI_dIg|MfqpUXO@geCyg Cc1ryK literal 0 HcmV?d00001 diff --git a/recipes/novilist_portal_hr.recipe b/recipes/novilist_portal_hr.recipe new file mode 100644 index 0000000000..14d4415ec4 --- /dev/null +++ b/recipes/novilist_portal_hr.recipe @@ -0,0 +1,49 @@ +__license__ = 'GPL v3' +__copyright__ = '2012, Darko Miletic ' +''' +www.novilist.hr +''' + +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class NoviList_Portal_hr(BasicNewsRecipe): + title = 'Novi List - online portal' + __author__ = 'Darko Miletic' + description = 'Portal Novog Lista' + publisher = 'NOVI LIST d.d.' + category = 'Novi list, politika, hrvatski dnevnik, Novine, Hrvatska, Croatia, News, newspaper, Hrvatski,Primorje, dnevni list, Rijeka' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'hr' + publication_type = 'newsportal' + masthead_url = 'http://www.novilist.hr/design/novilist/images/logo-print.gif' + extra_css = """ + body{font-family: Geneva,Arial,Helvetica,Swiss,sans-serif } + h1{font-family: Georgia,serif} + img{display:block; margin-bottom: 0.4em; margin-top: 0.4em} + """ + + preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')] + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + , 'linearize_tables' : True + } + + keep_only_tags = [dict(name='div', attrs={'id':'content'})] + + remove_tags = [dict(name=['meta', 'link', 'iframe', 'embed', 'object'])] + remove_attributes=['border', 'lang'] + + feeds = [(u'Vijesti', u'http://www.novilist.hr/rss/feed/sve.xml')] + + + def print_version(self, url): + return url.replace('http://www.novilist.hr/','http://www.novilist.hr/layout/set/print/')