calibre/recipes/180.recipe
Carlos Alves c13bb38178 Update recipes of Uruguay.
Delete diario_salto.recipe, the site has been down for a while.
Delete la_diaria.recipe, it requires a paid subscription.
Delete unoticias.recipe, the newspaper closed months ago.
Add lr21.recipe, newspaper.
Update 10minutos.recipe
Update 180.recipe
Update diario_el_pueblo.recipe
Update el_observador.recipe
Update el_pais_uy.recipe
Update padreydecano.recipe
2016-01-11 14:29:59 -03:00

59 lines
1.7 KiB
Python

#!/usr/bin/env python2
##
## Last Edited: 2016-01-11 Carlos Alves <carlos@carlosalves.info>
##
__license__ = 'GPL v3'
__author__ = '2010, Gustavo Azambuja <hola at gazambuja.com>'
'''
180.com.uy
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Noticias(BasicNewsRecipe):
title = '180.com.uy'
__author__ = 'Gustavo Azambuja'
description = 'Noticias de Uruguay'
language = 'es_UY'
timefmt = '[%a, %d %b, %Y]'
use_embedded_content = False
recursion = 5
encoding = 'utf-8'
remove_javascript = True
no_stylesheets = True
oldest_article = 2
max_articles_per_feed = 100
remove_tags_after = dict(name='article')
keep_only_tags = [
dict(name='h3', attrs={'class':'title'}),
dict(name='div', attrs={'class':'copete'}),
dict(name='article', attrs={'class':'texto'})
]
remove_tags = [
dict(name=['object','link'])
]
remove_attributes = ['width','height', 'style', 'font', 'color']
extra_css = '''
h1{font-family:Geneva, Arial, Helvetica, sans-serif;color:#154B7A;}
h3{font-size: 14px;color:#999999; font-family:Geneva, Arial, Helvetica, sans-serif;font-weight: bold;}
h2{color:#666666; font-family:Geneva, Arial, Helvetica, sans-serif;font-size:small;}
p {font-family:Arial,Helvetica,sans-serif;}
'''
feeds = [
(u'Titulares', u'http://www.180.com.uy/feed.php')
]
def get_cover_url(self):
pass
def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
return soup