View Single Post
Old 11-19-2008, 07:44 PM   #2
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by sherman View Post
Hey folks, I was wondering if anyone with more expertise than me could create a recipe for http://www.stuff.co.nz/, with emphasis on the Top Stories, National and World news, Sport, tech, and the Manawatu Standard local news feeds?
Here is the recipe with just one feed, you can add the rest you prefer.

Code:
#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
stuff.co.nz
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Stuff(BasicNewsRecipe):
    title                 = u'Stuff NZ'
    __author__            = u'Darko Miletic'
    description           = u'news from New Zealand'    
    oldest_article        = 7
    max_articles_per_feed = 100
    delay                  = 1
    simultaneous_downloads = 1 
    no_stylesheets        = True
    use_embedded_content  = False

    feeds          = [  
                       (u'Top Stories', u'http://www.stuff.co.nz/feeds/topstories.xml')
                     ]

    def print_version(self, url):
        main, sep, rest = url.partition('?')
        return main.replace('http://www.stuff.co.nz/','http://www.stuff.co.nz/print/')
kiklop74 is offline   Reply With Quote