Quote:
Originally Posted by sherman
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/')