From eb5d10259aa6d8ee6d1a538a1ea3c4c55f13e579 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 30 Dec 2016 08:34:05 +0530 Subject: [PATCH] Update Telam. Fixes #1653100 [Updated recipe for Telam](https://bugs.launchpad.net/calibre/+bug/1653100) --- recipes/icons/telam.png | Bin 536 -> 465 bytes recipes/telam.recipe | 36 +++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/recipes/icons/telam.png b/recipes/icons/telam.png index 116d86c56a5daa20394b8a5a6449f0b423ea7d1d..13d9be41873d3c314b79708045e3921d424d7dd2 100644 GIT binary patch delta 440 zcmV;p0Z0Cr1knSKBYyw{b3#c}2nYxWdTlf8;6K@f$%wrBid6j>a>XxPZmOb|raO^m&Jz<&b~$MO4oK7Roa0E5B6 zK9YDJ%jHtY;cytnar|tp%*~qtPIWBJO!>E$w#u)p1=nNRlK~yB<<-}mu652aLQm$|En_c)zSSZncppD+xmR4OTrF$Ng~ z!7ruM^X-BdV>qAB91aJB5Nx+wR;v}4%jGXksZ{zc05O`)=8ukPzu$kX8_?}`L&tF* iI%lo*`)0Fw0r&&R)F={CiQnx20000h4u?o72@W8N1M1%zG$wD*BTt)J>Pd5tV}Aipv^hU-_J7@6&(Q7zcntt#KP5IM z=TGi}E|jTp`rh;u`#f9x=0&tQ3HgrhBe~QAy;ISwnWf`n+M$o@Ec$FY56{0vfEY_$ zdz94&!waF4JV%E9-AhX=Z*TtiZuUVlJ0MqE!npW++_BoTCCG^swjaELld+MbK_|`# zNNT=vTZG|tHGh~=m4_gEah&JhfK!1Ez=4$hPT=gI;T zbXe6jxiw-Z(n4@cEoG-`oT14T2%&&81%gWOAb_ee3<4L@4-v8KuY{17%1_%_i5r7A zQPL=AMkJ;gI@dG-UE?rx4wWfTC=hrq)~d@`|4_yWS$L`E4$HZ&$XE7Oc(HiOT3pRv z?(wlJsu4ZYk)uX89ECgBg&EdhxNFFn^^F;)UOqcsdq{xCC~o?H%qZU{>6eyeSDSX) z6#kS#!Ylxcs9x7#{%RqyQw6Yv;%5IhL;n9W{Q|v(wG&=x?b`qV002ovPDHLkV1h_f B@$3Kq diff --git a/recipes/telam.recipe b/recipes/telam.recipe index 30ae84f712..7be32dee23 100644 --- a/recipes/telam.recipe +++ b/recipes/telam.recipe @@ -1,5 +1,9 @@ +#!/usr/bin/env python2 +# -*- mode: python -*- +# -*- coding: utf-8 -*- + __license__ = 'GPL v3' -__copyright__ = '2012-2015, Darko Miletic ' +__copyright__ = '2012-2016, Darko Miletic ' ''' www.telam.com.ar ''' @@ -22,7 +26,8 @@ class Telam(BasicNewsRecipe): remove_empty_feeds = True auto_cleanup = True publication_type = 'newsportal' - masthead_url = 'http://www.telam.com.ar/img/logo_small.png' + PREFIX = 'http://www.telam.com.ar' + masthead_url = 'http://www.telam.com.ar/assets/img/logo.svg' extra_css = """ body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em; display:block} @@ -33,15 +38,20 @@ class Telam(BasicNewsRecipe): } feeds = [ - - (u'Ultimas noticias', u'http://www.telam.com.ar/rss2/ultimasnoticas.xml'), - (u'Politica', u'http://www.telam.com.ar/rss2/politica.xml'), - (u'Economia', u'http://www.telam.com.ar/rss2/economia.xml'), - (u'Sociedad', u'http://www.telam.com.ar/rss2/sociedad.xml'), - (u'Policiales', u'http://www.telam.com.ar/rss2/policiales.xml'), - (u'Internacionales', u'http://www.telam.com.ar/rss2/mundo.xml'), - (u'Espectaculos', u'http://www.telam.com.ar/rss2/espectaculos.xml'), - (u'Cultura', u'http://www.telam.com.ar/rss2/cultura.xml'), - (u'Deportes', u'http://www.telam.com.ar/rss2/deportes.xml'), - (u'Opinion', u'http://www.telam.com.ar/rss2/opinion.xml') + (u'Ultimas noticias', u'http://www.telam.com.ar/rss2/ultimasnoticias.xml'), + (u'Politica', u'http://www.telam.com.ar/rss2/politica.xml'), + (u'Economia', u'http://www.telam.com.ar/rss2/economia.xml'), + (u'Sociedad', u'http://www.telam.com.ar/rss2/sociedad.xml'), + (u'Policiales', u'http://www.telam.com.ar/rss2/policiales.xml'), + (u'Internacionales', u'http://www.telam.com.ar/rss2/internacional.xml'), + (u'Espectaculos', u'http://www.telam.com.ar/rss2/espectaculos.xml'), + (u'Cultura', u'http://www.telam.com.ar/rss2/cultura.xml'), + (u'Deportes', u'http://www.telam.com.ar/rss2/deportes.xml'), + (u'Educacion', u'http://www.telam.com.ar/rss2/educacion.xml') ] + + def get_article_url(self, article): + url = BasicNewsRecipe.get_article_url(self, article) + if url.startswith('/'): + return self.PREFIX + url + return url