From 385b4472ca9f9b2dee869e6fa69e038ea8ea9a5f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 19 May 2011 10:15:19 -0600 Subject: [PATCH] Dilema Veche by Silviu Cotoara --- recipes/dilemaveche.recipe | 55 ++++++++++++++++++++++++++++++++++ recipes/icons/dilemaveche.png | Bin 0 -> 558 bytes 2 files changed, 55 insertions(+) create mode 100644 recipes/dilemaveche.recipe create mode 100644 recipes/icons/dilemaveche.png diff --git a/recipes/dilemaveche.recipe b/recipes/dilemaveche.recipe new file mode 100644 index 0000000000..0d5013b287 --- /dev/null +++ b/recipes/dilemaveche.recipe @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2011, Silviu Cotoar\u0103' +''' +dilemaveche.ro +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class DilemaVeche(BasicNewsRecipe): + title = u'Dilema Veche' + __author__ = u'Silviu Cotoar\u0103' + description = u'Sunt vechi, domnule!' + publisher = u'Dilema Veche' + oldest_article = 50 + language = 'ro' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + category = 'Ziare' + encoding = 'utf-8' + cover_url = 'http://www.dilemaveche.ro/sites/all/themes/dilema/theme/dilema_two/layouter/dilema_two_homepage/logo.png' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + keep_only_tags = [ + dict(name='h1', attrs={'class':'art_title'}) + , dict(name='h1', attrs={'class':'art_title online'}) + , dict(name='div', attrs={'class':'item'}) + , dict(name='div', attrs={'class':'art_content'}) + ] + + remove_tags = [ + dict(name='div', attrs={'class':['article_details']}) + , dict(name='div', attrs={'class':['controale']}) + , dict(name='div', attrs={'class':['art_related_left']}) + ] + + remove_tags_after = [ + dict(name='div', attrs={'class':['article_details']}) + ] + + feeds = [ + (u'Feeds', u'http://www.dilemaveche.ro/rss.xml') + ] + + def preprocess_html(self, soup): + return self.adeify_images(soup) diff --git a/recipes/icons/dilemaveche.png b/recipes/icons/dilemaveche.png new file mode 100644 index 0000000000000000000000000000000000000000..dd29eb828630ad781c551d7a1e1a41728012261a GIT binary patch literal 558 zcmV+}0@3}6P)USUwL&buqgp>{lcBHPM zQW-K-e1LoeONFLRn#O4xIerXH-IO}q?cVq9x#t|+E6#>PwbN+ec^;akaTQ8IGMU7( zEEXOtP*_|fl}hn%2-kJh0D>SO zoldi~v=qHaN-0d!L`sR{I7lf&2|@_^Cnu~_Dt!6&bvA=uuZIc(5{U#th)}=hdEC$C zcvs&<)3j&+fLJUBu~?V~L4Y?Hkh5(*?=;Bg^8n~dDF&yf^!xqDV^R~tQmGUxl?t`@ wb!^+dW;^Sgue#$#9BY1_VzJ1>LgChcze@7QSRIV02LJ#707*qoM6N<$f|jiQH~;_u literal 0 HcmV?d00001