mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
ABC and Ultima Hora by Darko Miletic
This commit is contained in:
parent
1913404ddf
commit
67f87e193d
BIN
resources/images/news/abc_py.png
Normal file
BIN
resources/images/news/abc_py.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
resources/images/news/ultimahora.png
Normal file
BIN
resources/images/news/ultimahora.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 690 B |
49
resources/recipes/abc_py.recipe
Normal file
49
resources/recipes/abc_py.recipe
Normal file
@ -0,0 +1,49 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
abc.com.py
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class ABC_py(BasicNewsRecipe):
|
||||
title = 'ABC digital'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Noticias de Paraguay y el resto del mundo'
|
||||
publisher = 'ABC'
|
||||
category = 'news, politics, Paraguay'
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'cp1252'
|
||||
use_embedded_content = False
|
||||
language = 'es_PY'
|
||||
remove_empty_feeds = True
|
||||
publication_type = 'newspaper'
|
||||
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} '
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags = [dict(name=['form','iframe','embed','object','link','base','table']),dict(attrs={'class':'toolbox'})]
|
||||
remove_tags_after = dict(attrs={'class':'date'})
|
||||
keep_only_tags = [dict(attrs={'class':'zcontent'})]
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'Ultimo momento' , u'http://www.abc.com.py/ultimo-momento.xml' )
|
||||
,(u'Nacionales' , u'http://www.abc.com.py/nacionales.xml' )
|
||||
,(u'Internacionales' , u'http://www.abc.com.py/internacionales.xml' )
|
||||
,(u'Deportes' , u'http://www.abc.com.py/deportes.xml' )
|
||||
,(u'Espectaculos' , u'http://www.abc.com.py/espectaculos.xml' )
|
||||
,(u'Ciencia y Tecnologia', u'http://www.abc.com.py/ciencia-y-tecnologia.xml')
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return soup
|
52
resources/recipes/ultimahora.recipe
Normal file
52
resources/recipes/ultimahora.recipe
Normal file
@ -0,0 +1,52 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
ultimahora.com
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class UltimaHora_py(BasicNewsRecipe):
|
||||
title = 'Ultima Hora'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Noticias de Paraguay y el resto del mundo'
|
||||
publisher = 'EDITORIAL EL PAIS S.A.'
|
||||
category = 'news, politics, Paraguay'
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'cp1252'
|
||||
use_embedded_content = False
|
||||
language = 'es_PY'
|
||||
remove_empty_feeds = True
|
||||
publication_type = 'newspaper'
|
||||
masthead_url = 'http://www.ultimahora.com/imgs/uh-com.gif'
|
||||
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} .sub_titulo_mediano,.TituloNota{font-family: Georgia,"Times New Roman",Times,serif} .sub_titulo_mediano{font-weight: bold} '
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags = [dict(name=['form','iframe','embed','object','link','base','table'])]
|
||||
keep_only_tags = [dict(attrs={'id':['nota_titulo','nota_copete','texto']})]
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'Arte y Espectaculos' , u'http://www.ultimahora.com/adjuntos/rss/UHEspectaculos.xml' )
|
||||
,(u'Ciudad del Este' , u'http://www.ultimahora.com/adjuntos/rss/UHCDE.xml' )
|
||||
,(u'Deportes' , u'http://www.ultimahora.com/adjuntos/rss/UHDeportes.xml' )
|
||||
,(u'Ultimo momento' , u'http://www.ultimahora.com/adjuntos/rss/UltimoMomento.xml' )
|
||||
,(u'Nacionales' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-nacionales.xml' )
|
||||
,(u'Politica' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-politica.xml' )
|
||||
,(u'Sucesos' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-sucesos.xml' )
|
||||
,(u'Economia' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-economia.xml' )
|
||||
,(u'Ciencia y Tecnologia', u'http://www.ultimahora.com/adjuntos/rss/uh-rss-ciencia.xml' )
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return soup
|
@ -106,6 +106,7 @@ _extra_lang_codes = {
|
||||
'en_SG' : _('English (Singapore)'),
|
||||
'en_YE' : _('English (Yemen)'),
|
||||
'en_IE' : _('English (Ireland)'),
|
||||
'es_PY' : _('Spanish (Paraguay)'),
|
||||
'de_AT' : _('German (AT)'),
|
||||
'nl' : _('Dutch (NL)'),
|
||||
'nl_BE' : _('Dutch (BE)'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user