mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-12-26 14:50:18 -05:00
58 lines
2.5 KiB
Plaintext
58 lines
2.5 KiB
Plaintext
|
|
__license__ = 'GPL v3'
|
|
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
|
|
'''
|
|
clarin.com
|
|
'''
|
|
|
|
from calibre import strftime
|
|
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
class Clarin(BasicNewsRecipe):
|
|
title = 'Clarin'
|
|
__author__ = 'Darko Miletic'
|
|
description = 'Noticias de Argentina y mundo'
|
|
publisher = 'Grupo Clarin'
|
|
category = 'news, politics, Argentina'
|
|
oldest_article = 2
|
|
max_articles_per_feed = 100
|
|
use_embedded_content = False
|
|
no_stylesheets = True
|
|
cover_url = strftime('http://www.clarin.com/diario/%Y/%m/%d/portada.jpg')
|
|
encoding = 'cp1252'
|
|
language = 'es'
|
|
masthead_url = 'http://www.clarin.com/shared/v10/img/Hd/lg_Clarin.gif'
|
|
extra_css = ' body{font-family: Arial,Helvetica,sans-serif} h2{font-family: Georgia,"Times New Roman",Times,serif; font-size: xx-large} .Volan,.Pie,.Autor{ font-size: x-small} .Copete,.Hora{font-size: large} '
|
|
|
|
conversion_options = {
|
|
'comment' : description
|
|
, 'tags' : category
|
|
, 'publisher': publisher
|
|
, 'language' : language
|
|
}
|
|
|
|
remove_tags = [
|
|
dict(name='a' , attrs={'class':'Imp' })
|
|
,dict(name='div' , attrs={'class':'Perma' })
|
|
,dict(name='h1' , text='Imprimir' )
|
|
]
|
|
|
|
feeds = [
|
|
(u'Ultimo Momento', u'http://www.clarin.com/diario/hoy/um/sumariorss.xml')
|
|
,(u'El Pais' , u'http://www.clarin.com/diario/hoy/elpais.xml' )
|
|
,(u'Opinion' , u'http://www.clarin.com/diario/hoy/opinion.xml' )
|
|
,(u'El Mundo' , u'http://www.clarin.com/diario/hoy/elmundo.xml' )
|
|
,(u'Sociedad' , u'http://www.clarin.com/diario/hoy/sociedad.xml' )
|
|
,(u'La Ciudad' , u'http://www.clarin.com/diario/hoy/laciudad.xml' )
|
|
,(u'Policiales' , u'http://www.clarin.com/diario/hoy/policiales.xml' )
|
|
,(u'Deportes' , u'http://www.clarin.com/diario/hoy/deportes.xml' )
|
|
]
|
|
|
|
def print_version(self, url):
|
|
rest = url.partition('-0')[-1]
|
|
lmain = rest.partition('.')[0]
|
|
lurl = u'http://www.servicios.clarin.com/notas/jsp/clarin/v9/notas/imprimir.jsp?pagid=' + lmain
|
|
return lurl
|
|
|
|
|