Quote:
Originally Posted by TonytheBookworm
I'm trying to learn how to make my own recipes. Trying to follow the tutorial but I'm a little lost. I downloaded a python editor and then entered the following code:
|
The code looks OK to me.
Quote:
I get of course a list of links to the articles which is fine. But I want to get the actual articles as well.
|
I don't understand this part. I checked, and your feeds pull the articles fine. They also pull lots of other junk, but that's normal until you either remove that junk in the recipe, or use the recipe to pull the print version, which is designed to have less junk.
Quote:
So I read a little more about using the print version() function. The question I have is how can I get the url to the print version since it is dynamic.
|
I'm not sure why you say it's "dynamic" - it looks normally static to me.
Quote:
Code:
def print_version(self, url):
return url.replace(url+'?printArticle=y')
is that even close to being right?
|
Not bad, but, as you said, you need to remove the material after the "?" before adding your string.
Here is code that I tested on a few of your links. It should work.
Code:
def print_version(self, url):
return url.partition('?')[0] +'?printArticle=y'