Quote:
Originally Posted by Flexicat
I have started a recipe and so far have gotten:
|
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.