View Single Post
Old 02-09-2011, 05:01 PM   #2
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 DTM View Post
Please help a newbie! I'm sure this must have been answered somewhere, but I can't find it.

I have a recipe that includes multiple feeds from a single source: it's a newspaper with a feed for "Headlines", another for "Editorials", and so forth. Getting the printer-friendly version for each feed is easy, you simply substitute "&template=printart" for a string in the url. But the string to replace is different for each feed. For one feed, all the articles have "/1478/rss", for another it's "/1016/rss05", etc.

I can get them to work for each feed individually, but how do I handle multiple substitutions within the same recipe?
In your print_version add an if elif else chain to find which url to modify, and change it.
Starson17 is offline   Reply With Quote