View Single Post
Old 02-27-2010, 08:23 AM   #1500
moriakaice
Memento Mori
moriakaice began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Apr 2007
Device: eClicto, iPad WiFi, Kindle 3 WiFi
Quote:
Originally Posted by macrogeek View Post
I used the editor to make a quick and dirty recipe for Kukuburi.com.
I'm pretty happy w/ the result, but can't seem to export the recipe from Calibre.

Would anyone like to clean it up and save it as a file?
I didn't know how to trim the bottom buttons out of the feed.
Here, this should do the job:
Code:
#!/usr/bin/env  python

__license__ = 'GPL v3'
__author__ = 'Mori'
__version__ = 'v. 0.1'
'''
Kukuburi.com
'''

from calibre.web.feeds.news import BasicNewsRecipe
import re

class KukuburiRecipe(BasicNewsRecipe):
	__author__ = 'Mori'
	language = 'en'

	title = u'Kukuburi'
	publisher = u'Ramón Pérez'
	description = u'KUKUBURI by Ramón Pérez'
	
	no_stylesheets = True
	remove_javascript = True
	
	oldest_article = 100
	max_articles_per_feed = 100
	
	feeds = [
		(u'Kukuburi', u'http://feeds2.feedburner.com/Kukuburi')
	]
	
	preprocess_regexps = [
		(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in 
		[
			(r'<!--.*?-->', lambda match: ''),
			(r'<div class="feedflare".*?</div>', lambda match: '')
		]
	]
moriakaice is offline