mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1930480 [Updated recipe for Ambito.com](https://bugs.launchpad.net/calibre/+bug/1930480)
This commit is contained in:
parent
64faba50de
commit
da38b6653d
@ -1,8 +1,9 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008-2018, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2008-2021, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
ambito.com
|
ambito.com
|
||||||
'''
|
'''
|
||||||
@ -21,9 +22,13 @@ class Ambito(BasicNewsRecipe):
|
|||||||
encoding = 'utf8'
|
encoding = 'utf8'
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
|
handle_gzip = True
|
||||||
|
compress_news_images = True
|
||||||
|
scale_news_images_to_device = True
|
||||||
ignore_duplicate_articles = {'url'}
|
ignore_duplicate_articles = {'url'}
|
||||||
language = 'es_AR'
|
language = 'es_AR'
|
||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
|
masthead_url = 'https://www.ambito.com/css-custom/239/images/logo-239-2020v2.svg'
|
||||||
extra_css = """
|
extra_css = """
|
||||||
body{font-family: Roboto, sans-serif}
|
body{font-family: Roboto, sans-serif}
|
||||||
"""
|
"""
|
||||||
@ -35,24 +40,21 @@ class Ambito(BasicNewsRecipe):
|
|||||||
, 'language' : language
|
, 'language' : language
|
||||||
}
|
}
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
dict(name='h6', attrs={'class': lambda x: x and 'bajada' in x.split()})
|
dict(name='div', attrs={'class': 'detail-header-wrapper'}),
|
||||||
,dict(name='span', attrs={'class': lambda x: x and 'dia' in x.split()})
|
dict(attrs={'class': lambda x: x and 'detail-body' in x.split()}),
|
||||||
,dict(attrs={'class': lambda x: x and 'titulo-noticia' in x.split()})
|
]
|
||||||
,dict(attrs={'class': lambda x: x and 'foto-perfil-columnista' in x.split()})
|
remove_tags = [dict(name=['object', 'link', 'embed', 'iframe', 'meta', 'link', 'img'])]
|
||||||
,dict(attrs={'class': lambda x: x and 'despliegue-noticia' in x.split()})
|
|
||||||
]
|
|
||||||
remove_tags = [dict(name=['object','link','embed','iframe','meta','link'])]
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Principales Noticias', u'http://www.ambito.com/rss/noticiasp.asp')
|
(u'Portada' , u'https://www.ambito.com/rss/home.xml')
|
||||||
,(u'Economia' , u'http://www.ambito.com/rss/noticias.asp?S=Econom%EDa')
|
,(u'Economia' , u'https://www.ambito.com/rss/economia.xml')
|
||||||
,(u'Politica' , u'http://www.ambito.com/rss/noticias.asp?S=Pol%EDtica')
|
,(u'Finanzas' , u'https://www.ambito.com/rss/finanzas.xml')
|
||||||
,(u'Informacion General' , u'http://www.ambito.com/rss/noticias.asp?S=Informaci%F3n%20General')
|
,(u'Politica' , u'https://www.ambito.com/rss/politica.xml')
|
||||||
,(u'Campo' , u'http://www.ambito.com/rss/noticias.asp?S=Agro')
|
,(u'Opinion' , u'https://www.ambito.com/rss/opinion.xml')
|
||||||
,(u'Internacionales' , u'http://www.ambito.com/rss/noticias.asp?S=Internacionales')
|
,(u'Informacion General', u'https://www.ambito.com/rss/informacion-general.xml')
|
||||||
,(u'Deportes' , u'http://www.ambito.com/rss/noticias.asp?S=Deportes')
|
,(u'Mundo' , u'https://www.ambito.com/rss/mundo.xml')
|
||||||
,(u'Espectaculos' , u'http://www.ambito.com/rss/noticias.asp?S=Espect%E1culos')
|
,(u'Deportes' , u'https://www.ambito.com/rss/deportes.xml')
|
||||||
,(u'Tecnologia' , u'http://www.ambito.com/rss/noticias.asp?S=Tecnolog%EDa')
|
,(u'Espectaculos' , u'https://www.ambito.com/rss/espectaculos.xml')
|
||||||
,(u'Ambito Nacional' , u'http://www.ambito.com/rss/noticias.asp?S=Ambito%20Nacional')
|
,(u'Nacional' , u'https://www.ambito.com/rss/nacional.xml')
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user