View Single Post
Old 03-02-2010, 02:25 PM   #1524
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Starson17 View Post
Hold on, I'll set up a recipe testbed for you and see for myself.
OK, I tried it, and it seemed like it worked as I expected. Here's the basic recipe I tried. It only has two things in it, the RSS feed and my suggested replacement:
Spoiler:
from __future__ import with_statement
__license__ = 'GPL 3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'

from calibre.web.feeds.news import BasicNewsRecipe

class Walrus(BasicNewsRecipe):
title = u'The_Walrus'
__author__ = 'Starson17'
description = 'The_Walrus'
language = 'en'
use_embedded_content = False
no_stylesheets = True
remove_javascript = True
recursions = 1
oldest_article = 90

def print_version(self, url):
return url.replace('articles', 'print')

feeds = [
(u'Main', u'http://feeds.feedburner.com/WalrusFeatureArticles')
]


What's happening with your recipe? You said you tried my two suggestions, but I only gave one, the url.replace('articles', 'print') change. The other one was just the quote from the API about how print_version worked.

Edit: I can't work on the merger code because Calibre is busy doing a massive metadata update (I love the automation since Kovid let me add an option that locks author/title).

The code above seemed to pull a pretty clean print version for me, with some links, that when followed were mostly crud. Recursion to 0 would turn that off. You'll have to be more specific on what problems you're having.

Last edited by Starson17; 03-02-2010 at 02:52 PM.
Starson17 is offline