mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
56 lines
1.9 KiB
Python
56 lines
1.9 KiB
Python
#!/usr/bin/env python
|
|
__license__ = 'GPL v3'
|
|
__author__ = 'Lorenzo Vigentini, based on Darko Miletic'
|
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>, Lorenzo Vigentini <l.vigentini at gmail.com>'
|
|
__version__ = 'v1.01'
|
|
__date__ = '10, January 2010'
|
|
__description__ = 'Italian daily newspaper (english version)'
|
|
'''
|
|
http://www.corriere.it/
|
|
'''
|
|
|
|
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
class ilCorriere(BasicNewsRecipe):
|
|
__author__ = 'Lorenzo Vigentini, based on Darko Miletic'
|
|
description = 'Italian daily newspaper (english version)'
|
|
|
|
cover_url = 'http://images.corriereobjects.it/images/static/common/logo_home.gif?v=200709121520'
|
|
title = u'Il Corriere della sera (english) '
|
|
publisher = 'RCS Digital'
|
|
category = 'News, politics, culture, economy, general interest'
|
|
|
|
language = 'en'
|
|
timefmt = '[%a, %d %b, %Y]'
|
|
|
|
oldest_article = 1
|
|
max_articles_per_feed = 100
|
|
use_embedded_content = False
|
|
recursion = 10
|
|
|
|
remove_javascript = True
|
|
no_stylesheets = True
|
|
|
|
html2lrf_options = [
|
|
'--comment', description
|
|
, '--category', category
|
|
, '--publisher', publisher
|
|
, '--ignore-tables'
|
|
]
|
|
|
|
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True'
|
|
|
|
keep_only_tags = [dict(name='div', attrs={'class':['news-dettaglio article','article']})]
|
|
|
|
remove_tags = [
|
|
dict(name=['base','object','link','embed']),
|
|
dict(name='div', attrs={'class':'news-goback'}),
|
|
dict(name='ul', attrs={'class':'toolbar'})
|
|
]
|
|
|
|
remove_tags_after = dict(name='p', attrs={'class':'footnotes'})
|
|
|
|
feeds = [
|
|
(u'News' , u'http://www.corriere.it/rss/english.xml' )
|
|
]
|