| 1 |
# -*- coding: utf-8 -*- |
| 2 |
__license__ = 'GPL v3' |
| 3 |
__author__ = 'Luis Hernandez' |
| 4 |
__copyright__ = 'Luis Hernandez<[email protected]>' |
| 5 |
description = 'Diario independiente de Asturias - v1.0 - 27 Jan 2011' |
| 6 |
|
| 7 |
''' |
| 8 |
www.lne.es |
| 9 |
''' |
| 10 |
|
| 11 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 12 |
|
| 13 |
|
| 14 |
class AdvancedUserRecipe1294946868(BasicNewsRecipe): |
| 15 |
title = 'La Nueva EspaƱa' |
| 16 |
publisher = 'Editorial Prensa Iberica' |
| 17 |
|
| 18 |
__author__ = 'Luis Hernandez' |
| 19 |
description = 'Diario independiente de Asturias' |
| 20 |
cover_url = 'http://estaticos00.lne.es//elementosWeb/mediaweb/images/iconos/logo2.jpg' |
| 21 |
|
| 22 |
oldest_article = 3 |
| 23 |
max_articles_per_feed = 100 |
| 24 |
|
| 25 |
remove_javascript = True |
| 26 |
no_stylesheets = True |
| 27 |
use_embedded_content = False |
| 28 |
|
| 29 |
encoding = 'ISO-8859-1' |
| 30 |
language = 'es' |
| 31 |
timefmt = '[%a, %d %b, %Y]' |
| 32 |
|
| 33 |
keep_only_tags = [ |
| 34 |
dict(name='div', attrs={'class': ['noticia_titular', 'subtitulo', 'noticiadd2', 'noticia_texto']}), |
| 35 |
dict(name='div', attrs={'id': ['noticia_texto']}), |
| 36 |
] |
| 37 |
|
| 38 |
extra_css = ' p{text-align: justify; font-size: 100%} body{ text-align: left; font-family: serif; font-size: 100% } h1{ font-family: sans-serif; font-size:150%; font-weight: 600; text-align: justify; } h2{ font-family: sans-serif; font-size:120%; font-weight: 500; text-align: justify } ' # noqa: E501 |
| 39 |
|
| 40 |
remove_tags_before = dict(name='div', attrs={'class': ['contenedor']}) |
| 41 |
remove_tags_after = dict(name='div', attrs={'class': ['fin_noticia']}) |
| 42 |
|
| 43 |
remove_tags = [ |
| 44 |
dict( |
| 45 |
name='div', |
| 46 |
attrs={ |
| 47 |
'class': [ |
| 48 |
'epigrafe', |
| 49 |
'antetitulo', |
| 50 |
'bloqueclear', |
| 51 |
'bloqueclear_video', |
| 52 |
'cuadro_multimedia', |
| 53 |
'cintillo2', |
| 54 |
'editor_documentos', |
| 55 |
'noticiadd', |
| 56 |
'noticiadd3', |
| 57 |
'noticiainterior', |
| 58 |
'fin_noticia', |
| 59 |
] |
| 60 |
}, |
| 61 |
), |
| 62 |
dict(name='div', attrs={'id': ['evotos']}), # noqa: E501 |
| 63 |
] |
| 64 |
|
| 65 |
feeds = [ |
| 66 |
('Al minuto', 'http://www.lne.es/elementosInt/rss/AlMinuto'), |
| 67 |
('General', 'http://www.lne.es/elementosInt/rss/55'), |
| 68 |
('Nacional', 'http://www.lne.es/elementosInt/rss/43'), |
| 69 |
('Internacional', 'http://www.lne.es/elementosInt/rss/44'), |
| 70 |
('Economia', 'http://www.lne.es/elementosInt/rss/45'), |
| 71 |
('Deportes', 'http://www.lne.es/elementosInt/rss/47'), |
| 72 |
('Campeones', 'http://www.lne.es/elementosInt/rss/65'), |
| 73 |
('Sociedad', 'http://www.lne.es/elementosInt/rss/46'), |
| 74 |
('Sucesos', 'http://www.lne.es/elementosInt/rss/48'), |
| 75 |
('Galeria', 'http://www.lne.es/elementosInt/rss/51'), |
| 76 |
('Cultura', 'http://www.lne.es/elementosInt/rss/66'), |
| 77 |
('Motor', 'http://www.lne.es/elementosInt/rss/62'), |
| 78 |
('Opinion', 'http://www.lne.es/elementosInt/rss/52'), |
| 79 |
('Asturias', 'http://www.lne.es/elementosInt/rss/42'), |
| 80 |
('Oviedo', 'http://www.lne.es/elementosInt/rss/31'), |
| 81 |
('Gijon', 'http://www.lne.es/elementosInt/rss/35'), |
| 82 |
('Aviles', 'http://www.lne.es/elementosInt/rss/36'), |
| 83 |
('Nalon', 'http://www.lne.es/elementosInt/rss/37'), |
| 84 |
('Cuencas', 'http://www.lne.es/elementosInt/rss/38'), |
| 85 |
('Caudal', 'http://www.lne.es/elementosInt/rss/39'), |
| 86 |
('Oriente', 'http://www.lne.es/elementosInt/rss/40'), |
| 87 |
('Occidente', 'http://www.lne.es/elementosInt/rss/41'), |
| 88 |
('Mar y Campo', 'http://www.lne.es/elementosInt/rss/63'), |
| 89 |
('Ultima', 'http://www.lne.es/elementosInt/rss/50'), |
| 90 |
] |