mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Improved Il Messagero and Leggo (it)
This commit is contained in:
parent
6fcff2462e
commit
ec208049c5
@ -7,14 +7,14 @@ description = 'Italian daily newspaper - v1.01 (04, January 2010)'
|
||||
'''
|
||||
http://www.messaggero.it/
|
||||
'''
|
||||
|
||||
import time
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class IlMessaggero(BasicNewsRecipe):
|
||||
__author__ = 'Gabriele Marini'
|
||||
description = 'Italian News'
|
||||
|
||||
cover_url = 'http://www.ilmessaggero.it/img_tst/logomsgr.gif'
|
||||
# cover_url = 'http://www.ilmessaggero.it/img_tst/logomsgr.gif'
|
||||
title = u'Il Messaggero'
|
||||
publisher = 'Caltagirone Editore'
|
||||
category = 'News, politics, culture, economy, general interest'
|
||||
@ -34,6 +34,21 @@ class IlMessaggero(BasicNewsRecipe):
|
||||
dict(name='h2', attrs={'class':'sottotitLettura'}),
|
||||
dict(name='span', attrs={'class':'testoArticoloG'})
|
||||
]
|
||||
def get_cover_url(self):
|
||||
cover = None
|
||||
st = time.localtime()
|
||||
year = str(st.tm_year)
|
||||
month = "%.2d" % st.tm_mon
|
||||
day = "%.2d" % st.tm_mday
|
||||
cover='http://carta.ilmessaggero.it/' + year + month + day + '/jpeg/MSGR_20_CITTA_1.jpg'
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
try:
|
||||
br.open(cover)
|
||||
except:
|
||||
self.log("\nCover unavailable")
|
||||
cover = 'http://www.ilmessaggero.it/img_tst/logomsgr.gif'
|
||||
|
||||
return cover
|
||||
|
||||
|
||||
|
||||
|
@ -7,14 +7,14 @@ description = 'Italian daily newspaper - v1.00 05-05-2010'
|
||||
'''
|
||||
http://www.leggo.it
|
||||
'''
|
||||
|
||||
import time
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class LeggoIT(BasicNewsRecipe):
|
||||
__author__ = 'Gabriele Marini'
|
||||
description = 'Italian Free daily newspaper'
|
||||
|
||||
cover_url = 'http://www.leggo.it/img/logo-leggo2.gif'
|
||||
# cover_url = 'http://www.leggo.it/img/logo-leggo2.gif'
|
||||
title = u'Leggo.it'
|
||||
publisher = 'Ced Caltagirone Editore S.p.A.'
|
||||
category = 'News, politics, culture, economy, general interest'
|
||||
@ -46,4 +46,20 @@ class LeggoIT(BasicNewsRecipe):
|
||||
(u'Salute', u'http://www.leggo.it/rss/salute.xml'),
|
||||
(u'Scienza', u'http://www.leggo.it/rss/scienza.xml')
|
||||
]
|
||||
def get_cover_url(self):
|
||||
cover = None
|
||||
st = time.localtime()
|
||||
year = str(st.tm_year)
|
||||
month = "%.2d" % st.tm_mon
|
||||
day = "%.2d" % st.tm_mday
|
||||
cover='http://www.leggo.it/'+ year + month + day + '/jpeg/LEGGO_ROMA_1.jpg'
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
try:
|
||||
br.open(cover)
|
||||
except:
|
||||
self.log("\nCover unavailable")
|
||||
cover = 'http://www.leggo.it/img/logo-leggo2.gif'
|
||||
|
||||
return cover
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user