Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 03-29-2011, 10:31 AM   #1
bosplans
Member
bosplans began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Mar 2011
Device: kindle 3
Help on a non working recipes (Sole24Ore)

I made a nice recipe and it worked since so far.
A couple of days ago the news source changed the feed structure using feedportal as service provider.
Now my former recipes does not work anymore ;-)

I figure out the problem is they use obscure link now, so I guess it should be possible to use use the def_print option with some regex on the url. Unfortunatly I do not know reg ex!
I should be able to convert following link strutture, from:

'http://rss.feedsportal.com/c/32276/f/566660/s/13b7117a/l/0L0Silsole24ore0N0Cart0Cnotizie0C20A110E0A30E290Clampedusa0Eabitanti0Eoccu pano0Emunicipio0E11570A60Bshtml0Duuid0FAauakRKD/story01.htm

to:

'http://www.ilsole24ore.com/art/notizie/2011-03-29/lampedusa-abitanti-occupano-municipio-115706_PRN.shtml

The first part of the link is static, the dynamic part is the bold one. I know in the first link there are all the infos needed, but I can not figure out the code

Any help?

Here the former recipes:
Code:
__author__    = 'Marco Saraceno'
__copyright__ = '2010, Marco Saraceno <marcosaraceno at gmail.com>'
description   = 'Italian daily newspaper - v 1.1 (Mar14,2011)'

'''
http://www.ilsole24ore.com
'''

class IlSole24Ore(BasicNewsRecipe):
    __author__        = 'Marco Saraceno'
    description   = 'Italian financial daily newspaper'

    cover_url      = 'http://www.shopping24.ilsole24ore.com/ProductRelated/rds/img/logo_sole.gif'
    title          = u'Il Sole 24 Ore'
    publisher      = 'Gruppo editoriale GRUPPO 24ORE'
    category       = 'News, politics, culture, economy, financial, Italian'

    language       = 'it'
    timefmt        = '[%a, %d %b, %Y]'

    oldest_article = 2
    max_articles_per_feed = 100
    use_embedded_content  = False
    recursion             = 2
    extra_css      = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt  }'

         
    remove_tags = [
                            dict(name='div', attrs={'class':['header','titolo']}),
                            dict(name='table', attrs={'class':['footer1024','footerdown']}),
                           ]

    feeds = [
                  (u'Notizie Italia', u'http://www.ilsole24ore.com/rss/notizie/italia.xml'),
				  (u'Notizie Europa', u'http://www.ilsole24ore.com/rss/notizie/europa.xml'),
				  (u'Notizie USA', u'http://www.ilsole24ore.com/rss/notizie/usa.xml'),
				  (u'Notizie Americhe', u'http://www.ilsole24ore.com/rss/notizie/americhe.xml'),
				  (u'Notizie Medio Oriente e Africa', u'http://www.ilsole24ore.com/rss/notizie/medio-oriente-e-africa.xml'),
				  (u'Notizie Asia e Oceania', u'http://www.ilsole24ore.com/rss/notizie/asia-e-oceania.xml'),
                  (u'Commenti', u'http://www.ilsole24ore.com/rss/commenti-e-idee.xml'),
                  (u'Norme e tributi', u'http://www.ilsole24ore.com/rss/norme-e-tributi.xml'),
                  (u'Finanza', u'http://www.ilsole24ore.com/rss/finanza-e-mercati.xml'),
                  (u'Economia', u'http://www.ilsole24ore.com/rss/economia.xml'),
                  (u'Tecnologia', u'http://www.ilsole24ore.com/rss/tecnologie.xml'),
                  (u'Cultura', u'http://www.ilsole24ore.com/rss/cultura.xml'),
                ]

	 
    def print_version(self, url):
          return url.replace('.shtml', '_PRN.shtml')
Moderator Notice
Thread closed as a duplicate of this thread:
https://www.mobileread.com/forums/sho...d.php?t=127486
Please don't create duplicate threads.

Last edited by Starson17; 03-29-2011 at 11:25 AM.
bosplans is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Too many recipes! CazMar Recipes 2 02-14-2011 06:12 PM
2 recipes derekliang Recipes 1 12-20-2010 11:44 PM
Where my recipes are kept? bthoven Calibre 6 02-26-2010 12:20 AM
TOC in recipes shaunconn Calibre 8 03-22-2009 04:24 PM
Sharing recipes seamad Calibre 3 03-10-2009 04:41 AM


All times are GMT -4. The time now is 04:39 AM.


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