Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 04-22-2019, 05:19 PM   #1
Ruben00
Junior Member
Ruben00 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2019
Device: Kindle 2016
Recipe for "Corriere Della Sera"

Quote:
First published on 5 March 1876, Corriere della Sera is one of Italy's oldest newspapers and is Italy's most read newspaper.
The existent recipe no longer works, so I tried to make a new one.
I'm new to Calibre, so please help me improving this recipe

Code:
#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

__author__ = 'Ruben Scopacasa'
__license__ = 'GPL v3'
__copyright__ = '2019, Ruben Scopacasa <ruben.scopacasa at gmail.com>'
__version__ = 'v1.00'
__date__ = '22, April 2019'

class CorriereDellaSeraRecipe(BasicNewsRecipe):
    title = u'Il Corriere della sera'
    publisher = 'RCS Digital'
    category = 'News, politics, culture, economy, general interest'
    
    language = 'it'
    timefmt = '[%a, %d %b, %Y]'
    
    oldest_article = 3
    max_articles_per_feed = 100
    simultaneous_downloads = 5
    
    no_stylesheets = True
    remove_tags_before = dict(name='h1')
    remove_tags = [dict(id='gallery')]
    ignore_duplicate_articles = {'title', 'url'}

    feeds = [
        ('Homepage', 'http://xml2.corriereobjects.it/rss/homepage.xml'),
        ('Editoriali', 'http://xml2.corriereobjects.it/rss/editoriali.xml'),
        ('Cronache', 'http://xml2.corriereobjects.it/rss/cronache.xml'),
        ('Politica', 'http://xml2.corriereobjects.it/rss/politica.xml'),
        ('Esteri', 'http://xml2.corriereobjects.it/rss/esteri.xml'),
        ('Economia', 'http://xml2.corriereobjects.it/rss/economia.xml'),
        ('Cultura', 'http://xml2.corriereobjects.it/rss/cultura.xml'),
    ]
        
    def print_version(self, url):
        return url.replace('.shtml', '_print.html')
    
    def get_cover_url(self): 
        return 'http://www.corriere.it/rss/images/logo_small.gif'
Ruben00 is offline   Reply With Quote
Old 04-23-2019, 12:46 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Looks fine, thanks. https://github.com/kovidgoyal/calibr...0b1a1d92508353
kovidgoyal is offline   Reply With Quote
Advert
Old 04-23-2019, 02:06 AM   #3
alan smith
Junior Member
alan smith began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2019
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
calibre is so powerful, but recently i find there is something wrong with the recipe of globaltimes(doesn't work) and chinadaily(need to subscribe to read the whole passage).I was wondering if you could make some updates?The version of the software I'm using is 3.41 ,thanks a lot
alan smith is offline   Reply With Quote
Reply

Tags
corriere, italian


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recipe for EPUB subscribers of "Tagesspiegel" and "Handelsblatt"? F.W. Recipes 0 05-14-2013 11:16 AM
New recipe for "Süddeutsche Zeitung" using "E-Paper mobile" subscription Ernst Recipes 3 02-16-2013 07:37 AM
Recipe for "Galicia Confidencial" and "De L a V" roebek Recipes 1 07-19-2011 09:17 AM
Corriere della Sera - Kindle Edition Format C: News 2 03-21-2009 10:39 AM


All times are GMT -4. The time now is 03:57 PM.


MobileRead.com is a privately owned, operated and funded community.