Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2011, 11:09 AM   #1
mzimmer
Junior Member
mzimmer began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2011
Location: Potsdam, Germany
Device: Onyx Boox M90
Request: PNN recipe similar to Der Tagesspiegel

I'm using the recipe Der Tagespiegel. The PNN is associated to this newspaper so I tried just to exchange the URL but it failed.

Using a simple recipe with just the RSS gives very poor output without pictures.

PNN links are:
http://www.pnn.de/zeitung/
http://www.pnn.de/rss/
mzimmer is offline   Reply With Quote
Old 02-17-2013, 10:34 AM   #2
renderke
Junior Member
renderke began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2013
Device: Sony PRS-T1
PNN recipe

Die Tagesspiegel-seite ist doch noch leicht anders, z.B. ist auf der PNN-Seite die "Drucken"-Seite gar nicht zu gebrauchen. Mit dem folgenden Code geht es, Ergänzungen willkommen!
Code:
from calibre.web.feeds.recipes import BasicNewsRecipe

'''Calibre recipe to convert the RSS feeds of the PNN to an ebook.'''

class SportsIllustratedRecipe(BasicNewsRecipe) :
    __author__    = 'n.kucklaender'
    __copyright__ = 'a.peter'
    __license__   = 'GPL v3'
    language      = 'de'
    description   = 'PNN RSS'
    version       = 1
    title         = u'PNN'
    timefmt       = ' [%d.%m.%Y]'

    oldest_article = 7.0
    no_stylesheets = True
    remove_javascript = True
    use_embedded_content = False
    publication_type = 'newspaper'

    remove_empty_feeds = True
    remove_tags = [dict(attrs={'class':['um-weather um-header-weather','um-has-sub um-mainnav','um-box','ts-products','um-meta-nav','um-box um-last','um-footer','um-footer-links','share hidden','um-buttons']}),dict(id=['dinsContainer'])]
   # remove_tags_before = [dict(name='div', attrs={'class':'um-first'})]
   # remove_tags_after = [dict(name='div', attrs={'class':'um-metabar'})]

    feeds = [(u'Titelseite', u'http://www.pnn.de/rss.xml'),
 	         (u'Dritte Seite', u'http://www.pnn.de/dritte-seite/rss.xml'),
 	         (u'Politik', u'http://www.pnn.de/politik/rss.xml'),
 	         (u'Meinung', u'http://www.pnn.de/meinung/rss.xml'),
             (u'Potsdam', u'http://www.pnn.de/potsdam/rss.xml'),
             (u'Havel-Spree', u'http://www.pnn.de/havel-spree/rss.xml'),
             (u'Potsdam-Mittelmark', u'http://www.pnn.de/pm/rss.xml'),
             (u'Berlin-Brandenburg', u'http://www.pnn.de/brandenburg-berlin/rss.xml'),
 	         (u'Wirtschaft', u'http://www.pnn.de/wirtschaft/rss.xml'),
             (u'Sport', u'http://www.pnn.de/sport/rss.xml'),
             (u'Regionalsport', u'http://www.pnn.de/regionalsport/rss.xml'),
 	         (u'Kultur', u'http://www.pnn.de/kultur/rss.xml'),
             (u'Potsdam-Kultur', u'http://www.pnn.de/potsdam-kultur/rss.xml'),
             (u'Wissen', u'http://www.pnn.de/wissen/rss.xml'), 
	         (u'Medien', u'http://www.pnn.de/medien/rss.xml'), 
             (u'Weltspiegel', u'http://www.pnn.de/weltspiegel/rss.xml'),  
             (u'Wissenschaft', u'http://www.pnn.de/campus/rss.xml'), 
             (u'Mobil', u'http://www.pnn.de/mobil/rss.xml'), 
             (u'Reise', u'http://www.pnn.de/reise/rss.xml'), 
             (u'Ratgeber', u'http://www.pnn.de/ratgeber/rss.xml'),          
             (u'Fragen des Tages', u'http://www.pnn.de/fragen-des-tages/rss.xml'),
           # (u'Potsdam bin ich', u'http://www.pnn.de/potsdam-bin-ich/rss.xml'),
             (u'Leserbriefe', u'http://www.pnn.de/leserbriefe/rss.xml')]

    def get_masthead_url(self):
        return 'http://www.pnn.de/app/base/img/pnn_logo.png'

    def print_version(self, url):
        return url.replace('.html', ',view,printVersion.html')
renderke is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request for recipe sumper Recipes 2 10-11-2010 02:25 AM
recipe to pull web page similar to 'print/save as pdf' JPD Recipes 15 09-29-2010 09:20 AM
Request for recipe exdream Calibre 3 04-24-2010 10:13 AM
"Der Tagesspiegel" (Berlin) über E-Books cubisticus Deutsches Forum 2 01-10-2009 03:43 PM
Request for Recipe ddavtian Calibre 2 11-24-2008 02:43 AM


All times are GMT -4. The time now is 11:35 AM.


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