View Single Post
Old 08-01-2010, 02:51 PM   #2374
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 Flexicat View Post
I have started a recipe and so far have gotten:
Spoiler:
Code:
class AdvancedUserRecipe1280684448(BasicNewsRecipe):
    title          = u'Twisting the Hellmouth'
    oldest_article = 7
    max_articles_per_feed = 100

    feeds          = [(u'Latest', u'http://www.tthfanfic.org/rss.php')]
Notice Code tags and Spoiler tags.

Quote:
I have also tried
def print_version(self, url):
return 'http://www.tthfanfic.org/wholestory.php?no=' + artid + '&format=print'
also with out success.
This should work if you put the code needed to extract artid from the url.

Try this:
Code:
    def print_version(self, url):
        split1 = url.split("/")
        xxx = split1[3]
        split2 = xxx.split("-")
        artid =  split2[1]
        print "artid is: ', artid
        return 'http://www.tthfanfic.org/wholestory.php?no=' + artid + '&format=print'
This isn't tested. Please don't some back with a simple "this doesn't work" - you'll need to set the numbers/subscripts if I've miscounted. I'll happily help, but make sure you post the complete recipe in code and spoiler tags.

Last edited by Starson17; 08-01-2010 at 02:55 PM.
Starson17 is offline