Update Ambito.com

Fixes #1649112 [Updated recipe for Ambito.com](https://bugs.launchpad.net/calibre/+bug/1649112)
This commit is contained in:
Kovid Goyal 2016-12-12 00:07:07 +05:30
parent 52f7b6c8ce
commit 1ec001d53d

View File

@ -1,3 +1,6 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2008-2016, Darko Miletic <darko.miletic at gmail.com>' __copyright__ = '2008-2016, Darko Miletic <darko.miletic at gmail.com>'
''' '''
@ -16,15 +19,13 @@ class Ambito(BasicNewsRecipe):
oldest_article = 2 oldest_article = 2
no_stylesheets = True no_stylesheets = True
encoding = 'utf8' encoding = 'utf8'
masthead_url = 'http://www.ambito.com/img/logo.jpg'
use_embedded_content = False use_embedded_content = False
remove_empty_feeds = True remove_empty_feeds = True
ignore_duplicate_articles = {'url'}
language = 'es_AR' language = 'es_AR'
publication_type = 'newsportal' publication_type = 'newsportal'
extra_css = """ extra_css = """
body{font-family: "Trebuchet MS",Verdana,sans-serif} body{font-family: Roboto, sans-serif}
.volanta{font-size: small}
.t2_portada{font-size: xx-large; font-family: Georgia,serif; color: #026698}
""" """
conversion_options = { conversion_options = {
@ -35,8 +36,10 @@ class Ambito(BasicNewsRecipe):
} }
keep_only_tags = [ keep_only_tags = [
dict(attrs={'class':['titulo-noticia','article-img']}), dict(name='h6', attrs={'class': lambda x: x and 'bajada' in x.split()})
dict(attrs={'class': lambda x: x and 'despliegue-noticia' in x.split()}) ,dict(name='span', attrs={'class': lambda x: x and 'dia' in x.split()})
,dict(attrs={'class': lambda x: x and 'titulo-noticia' in x.split()})
,dict(attrs={'class': lambda x: x and 'despliegue-noticia' in x.split()})
] ]
remove_tags = [dict(name=['object','link','embed','iframe','meta','link'])] remove_tags = [dict(name=['object','link','embed','iframe','meta','link'])]