| 1 |
#!/usr/bin/env python |
| 2 |
# -*- mode: python -*- |
| 3 |
# -*- coding: utf-8 -*- |
| 4 |
|
| 5 |
__copyright__ = '2011-2016, Darko Miletic <darko.miletic at gmail.com>' |
| 6 |
''' |
| 7 |
www.iprofesional.com |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class iProfesional(BasicNewsRecipe): |
| 14 |
title = 'iProfesional.com' |
| 15 |
__author__ = 'Darko Miletic' |
| 16 |
description = 'Las ultimas noticias sobre profesionales' |
| 17 |
publisher = 'Emprendimientos Corporativos S.A.' |
| 18 |
category = 'news, IT, impuestos, negocios, politics, Argentina' |
| 19 |
oldest_article = 2 |
| 20 |
max_articles_per_feed = 200 |
| 21 |
no_stylesheets = True |
| 22 |
encoding = 'utf8' |
| 23 |
use_embedded_content = False |
| 24 |
language = 'es_AR' |
| 25 |
remove_empty_feeds = True |
| 26 |
publication_type = 'newsportal' |
| 27 |
masthead_url = 'http://www.iprofesional.com/img/header/logoiprofesional.png' |
| 28 |
extra_css = ''' |
| 29 |
body{font-family: "Open Sans", sans-serif} |
| 30 |
img{margin-bottom: 0.4em; display:block} |
| 31 |
.tituloprincipal{font-family: WhitneyBold, Arial, sans-serif; |
| 32 |
font-weight: bold; |
| 33 |
font-size: x-large; |
| 34 |
display: block; margin-bottom: 1em;} |
| 35 |
.bajadanh{font-size: small; display: block; margin-bottom: 1em;} |
| 36 |
''' |
| 37 |
|
| 38 |
conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language} |
| 39 |
|
| 40 |
keep_only_tags = [ |
| 41 |
dict(name='div', attrs={'class': lambda x: x and 'tituloprincipal' in x.split()}), |
| 42 |
dict(name='div', attrs={'class': lambda x: x and 'bajadanh' in x.split()}), |
| 43 |
dict(name='div', attrs={'class': lambda x: x and 'datosautornh' in x.split()}), |
| 44 |
dict(name='div', attrs={'class': lambda x: x and 'fotonotanh' in x.split()}), |
| 45 |
dict(name='div', attrs={'class': lambda x: x and 'contenidonotanh' in x.split()}), |
| 46 |
] |
| 47 |
remove_tags = [dict(name=['meta', 'link', 'base', 'embed', 'object', 'iframe'])] |
| 48 |
|
| 49 |
feeds = [ |
| 50 |
('Ultimas noticias', 'http://feeds.feedburner.com/iprofesional-principales-noticias'), |
| 51 |
('Finanzas', 'http://feeds.feedburner.com/iprofesional-finanzas'), |
| 52 |
('Impuestos', 'http://feeds.feedburner.com/iprofesional-impuestos'), |
| 53 |
('Negocios', 'http://feeds.feedburner.com/iprofesional-economia'), |
| 54 |
('Comercio Exterior', 'http://feeds.feedburner.com/iprofesional-comercio-exterior'), |
| 55 |
('Tecnologia', 'http://feeds.feedburner.com/iprofesional-tecnologia'), |
| 56 |
('Management', 'http://feeds.feedburner.com/iprofesional-managment'), |
| 57 |
('Marketing', 'http://feeds.feedburner.com/iprofesional-marketing'), |
| 58 |
('Legales', 'http://feeds.feedburner.com/iprofesional-legales'), |
| 59 |
('Autos', 'http://feeds.feedburner.com/iprofesional-autos'), |
| 60 |
('Vinos', 'http://feeds.feedburner.com/iprofesional-vinos-bodegas'), |
| 61 |
] |