From 39e76dfedf77b0145315d53c38bb525422365014 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 7 Aug 2013 21:36:10 +0530 Subject: [PATCH] La Capital de Rosario by Darko Miletic Fixes #1209289 [New recipe for La Capital de Rosario](https://bugs.launchpad.net/calibre/+bug/1209289) --- recipes/icons/lacapital.png | Bin 0 -> 1120 bytes recipes/lacapital.recipe | 76 ++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 recipes/icons/lacapital.png create mode 100644 recipes/lacapital.recipe diff --git a/recipes/icons/lacapital.png b/recipes/icons/lacapital.png new file mode 100644 index 0000000000000000000000000000000000000000..1b245e6874cfef054be50a14e2df5885d1bbd550 GIT binary patch literal 1120 zcmcgq`Crp@9R7UeNT4aGX=>qtfh9&sQG%G_xQqxnr4o@cgzT`>3L>T;W1IsQ#wj3R z0)c=W0&W}|C=9lJ`A*pZY-9HgY%pNo=0DN<^}L_=>v?{8|L{Ecu+Tt^{Vsa|046vH z8*aId&v&Dhg%2Ly907n82n&hyw@4I4ZOai6YDVI87Yw#bH@=8<)UR8w`fy z&0OmIVg_BQRjJ%6r(vZou3I1wiahIhKJB81v${Pc>^`v}qHS(TtL~gpVOx3U2IZtl zC4NkXuC9osvVb083|Z+c=B;lb^9!a+6tQzHC$?*5eSHn!VY^J) ziFUz-UQyDJES)N`FM^j1`kf_guV#KwkJz;wZsTebX$rkYV^siqR8RZf<%4X7Z86N( zF1uGvd)4y-ItA85_O_Cz=LaNdLsF1Gl|WOc&}7DCqeiRSkOSKh5e#v1-yP1eHbG#Q zD4HTqc_L4vNkJCVA(!b|g?Kg2_}!Z+o>cg?3&UFG&h$&uX|gDaGF4>E9^~ZJi5$B#9!+P}FQjQIlzP$zagvbl?U9WHA8V0w%z- zKsFO(vjBk!2r$TDK?D|CWdyk}$g^My?7Bh z^1~a0s@=9^yt)Ip_TJleH~i!e@0V7+c53JKqu|H>{Rdyp;g)q>dibKpuJmAV;tPMr zSq;Qy})3ZTr~wPi{53Z~p5`9H`k_ImJ#xF4M18w!KHg;jDtMtX}U; QH9ij{*gq88>=%#w4^h%VE&u=k literal 0 HcmV?d00001 diff --git a/recipes/lacapital.recipe b/recipes/lacapital.recipe new file mode 100644 index 0000000000..0c9553903c --- /dev/null +++ b/recipes/lacapital.recipe @@ -0,0 +1,76 @@ +__license__ = 'GPL v3' +__copyright__ = '2013, Darko Miletic ' +''' +www.lacapital.com.ar +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class LaCapital(BasicNewsRecipe): + title = 'La Capital de Rosario' + __author__ = 'Darko Miletic' + description = 'Noticias, actualidad y toda la informacion de Rosario y la region' + publisher = 'Diario La Capital S. A.' + category = 'news, politics, Rosario, Santa Fe, Argentina' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'es_AR' + remove_empty_feeds = True + publication_type = 'newspaper' + masthead_url = 'http://www.lacapital.com.ar/system/modules/com.tfsla.diario.core/resources/images/logoLaCapital_noCom.png' + extra_css = """ + body{font-family: Georgia,"Times New Roman",Times,serif } + img{margin-bottom: 0.4em; display:block} + """ + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + keep_only_tags=[dict(attrs={'class':'leer'})] + remove_tags_after=dict(attrs={'class':'notaA'}) + remove_tags = [ + dict(name=['meta','link','iframe','object']) + ,dict(name='div', attrs={'class':['herramientas','almargen','relacionadas']}) + ] + + + feeds = [ + (u'Portada' , u'http://www.lacapital.com.ar/rss/home.xml' ) + ,(u'La Ciudad' , u'http://www.lacapital.com.ar/rss/laciudad.xml' ) + ,(u'Politica' , u'http://www.lacapital.com.ar/rss/politica.xml' ) + ,(u'Economia' , u'http://www.lacapital.com.ar/rss/economia.xml' ) + ,(u'La Region' , u'http://www.lacapital.com.ar/rss/laregion.xml' ) + ,(u'Informacion General' , u'http://www.lacapital.com.ar/rss/informaciongral.xml' ) + ,(u'El Mundo' , u'http://www.lacapital.com.ar/rss/elmundo.xml' ) + ,(u'Opinion' , u'http://www.lacapital.com.ar/rss/opinion.xml' ) + ,(u'Cartas de lectores' , u'http://www.lacapital.com.ar/rss/cartasdelectores.xml') + ,(u'Escenario' , u'http://www.lacapital.com.ar/rss/escenario.xml' ) + ,(u'Policiales' , u'http://www.lacapital.com.ar/rss/policiales.xml' ) + ,(u'Ovacion' , u'http://www.lacapital.com.ar/rss/ovacion.xml' ) + ,(u'Turismo' , u'http://www.lacapital.com.ar/rss/turismo.xml' ) + ,(u'Economia' , u'http://www.lacapital.com.ar/rss/economia.xml' ) + ,(u'SeƱales' , u'http://www.lacapital.com.ar/rss/senales.xml' ) + ,(u'Educacion' , u'http://www.lacapital.com.ar/rss/educacion.xml' ) + ,(u'Estilo' , u'http://www.lacapital.com.ar/rss/estilo.xml' ) + ,(u'Salud' , u'http://www.lacapital.com.ar/rss/salud.xml' ) + ,(u'Tecnologia' , u'http://www.lacapital.com.ar/rss/tecnologia.xml' ) + ] + + def get_cover_url(self): + soup = self.index_to_soup('http://www.lacapital.com.ar/impresa/tapa.html') + for image in soup.findAll('img',alt=True): + if image['alt'].startswith('Tapa de papel'): + return image['src'] + return None + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup