From 6610a6ae4abe3ff9ff37e4fce03885153cd207f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 9 May 2011 09:03:50 -0600 Subject: [PATCH] Add Ziua Veche by Silviu Cotoara --- recipes/icons/ziuaveche.png | Bin 0 -> 554 bytes recipes/ziuaveche.recipe | 53 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 recipes/icons/ziuaveche.png create mode 100644 recipes/ziuaveche.recipe diff --git a/recipes/icons/ziuaveche.png b/recipes/icons/ziuaveche.png new file mode 100644 index 0000000000000000000000000000000000000000..91152b01eebb841025ddad4c88c68610d07f75fe GIT binary patch literal 554 zcmV+_0@eMAP) zUy?q%E32N!Yir2O&m({3DstDa0i{WIWDKG_$h1D$1We!>`rF$;BA8fQ1k4!t s>?sJqzW*?M6Vd1!`R8T+2Mhpz0Py&o=d{A2MF0Q*07*qoM6N<$g5NItGynhq literal 0 HcmV?d00001 diff --git a/recipes/ziuaveche.recipe b/recipes/ziuaveche.recipe new file mode 100644 index 0000000000..61df768e0a --- /dev/null +++ b/recipes/ziuaveche.recipe @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2011, Silviu Cotoar\u0103' +''' +ziuaveche.ro +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class ZiuaVeche(BasicNewsRecipe): + title = u'Ziua Veche' + __author__ = u'Silviu Cotoar\u0103' + description = 'Cotidian online' + publisher = 'Ziua Veche' + oldest_article = 5 + language = 'ro' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + category = 'Ziare,Cotidiane,Stiri' + encoding = 'utf-8' + cover_url = 'http://www.ziuaveche.ro/wp-content/themes/tema/images/zv-logo-alb-old.png' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + + keep_only_tags = [ + dict(name='div', attrs={'id':'singlePost'}) + + ] + + remove_tags = [ + dict(name='div', attrs={'id':'LikePluginPagelet'}) + + ] + + remove_tags_after = [ + dict(name='div', attrs={'id':'LikePluginPagelet'}) + ] + + feeds = [ + (u'Feeds', u'http://www.ziuaveche.ro/feed/rss') + ] + + def preprocess_html(self, soup): + return self.adeify_images(soup)