mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Telam
Fixes #1499844 [Updated recipe for Telam](https://bugs.launchpad.net/calibre/+bug/1499844)
This commit is contained in:
parent
ffff07bdd3
commit
6ede52c40d
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 594 B |
@ -1,5 +1,5 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2012, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2012-2015, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
www.telam.com.ar
|
www.telam.com.ar
|
||||||
'''
|
'''
|
||||||
@ -15,12 +15,13 @@ class Telam(BasicNewsRecipe):
|
|||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
max_articles_per_feed = 200
|
max_articles_per_feed = 200
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
encoding = 'utf8'
|
encoding = 'windows-1252'
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
language = 'es_AR'
|
language = 'es_AR'
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
|
auto_cleanup = True
|
||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
masthead_url = 'http://www.telam.com.ar/front/imagenes/encabezado/logotelam.jpg'
|
masthead_url = 'http://www.telam.com.ar/img/logo_small.png'
|
||||||
extra_css = """
|
extra_css = """
|
||||||
body{font-family: Arial,Helvetica,sans-serif }
|
body{font-family: Arial,Helvetica,sans-serif }
|
||||||
img{margin-bottom: 0.4em; display:block}
|
img{margin-bottom: 0.4em; display:block}
|
||||||
@ -33,30 +34,15 @@ class Telam(BasicNewsRecipe):
|
|||||||
, 'language' : language
|
, 'language' : language
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_tags = [dict(name=['meta','link'])]
|
|
||||||
remove_tags_before = dict(attrs={'class':'nota_fecha'})
|
|
||||||
remove_tags_after = dict(attrs={'class':'nota_completa'})
|
|
||||||
remove_attributes = ['lang']
|
|
||||||
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Ultimas noticias', u'http://www.telam.com.ar/xml/rss/' )
|
(u'Ultimas noticias', u'http://www.telam.com.ar/rss2/ultimasnoticas.xml' )
|
||||||
,(u'Politica' , u'http://www.telam.com.ar/xml/rss/1')
|
,(u'Politica' , u'http://www.telam.com.ar/rss2/politica.xml' )
|
||||||
,(u'Economia' , u'http://www.telam.com.ar/xml/rss/2')
|
,(u'Economia' , u'http://www.telam.com.ar/rss2/economia.xml' )
|
||||||
,(u'Sociedad' , u'http://www.telam.com.ar/xml/rss/3')
|
,(u'Sociedad' , u'http://www.telam.com.ar/rss2/sociedad.xml' )
|
||||||
,(u'Policiales' , u'http://www.telam.com.ar/xml/rss/4')
|
,(u'Policiales' , u'http://www.telam.com.ar/rss2/policiales.xml' )
|
||||||
,(u'Internacionales' , u'http://www.telam.com.ar/xml/rss/6')
|
,(u'Internacionales' , u'http://www.telam.com.ar/rss2/mundo.xml' )
|
||||||
,(u'Espectaculos' , u'http://www.telam.com.ar/xml/rss/7')
|
,(u'Espectaculos' , u'http://www.telam.com.ar/rss2/espectaculos.xml' )
|
||||||
,(u'Cultura' , u'http://www.telam.com.ar/xml/rss/8')
|
,(u'Cultura' , u'http://www.telam.com.ar/rss2/cultura.xml' )
|
||||||
,(u'Deportes' , u'http://www.telam.com.ar/xml/rss/9')
|
,(u'Deportes' , u'http://www.telam.com.ar/rss2/deportes.xml' )
|
||||||
,(u'Telam Investiga' , u'http://www.telam.com.ar/xml/rss/5')
|
,(u'Opinion' , u'http://www.telam.com.ar/rss2/opinion.xml' )
|
||||||
]
|
]
|
||||||
|
|
||||||
def print_version(self, url):
|
|
||||||
artid = url.rpartition('/')[2]
|
|
||||||
return 'http://www.telam.com.ar/?codProg=imprimir-nota&id=' + artid
|
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
|
||||||
for item in soup.findAll(style=True):
|
|
||||||
del item['style']
|
|
||||||
return soup
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user