Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Here's what I'm trying to do:

I have a private or user defined string. I would like to define a list of URLs, such as:

http://example.com/?item={REPLACE_ME}
http://example.net/?item={REPLACE_ME}
http://example.org/?item={REPLACE_ME}

These URLs are to RSS content.

I would like to use a string replace on each URL, replacing {REPLACE_ME} with the string given in the private/user-defined string.

Then, I would like to supply the altered URLs to Fetch Feed (or similar), to get a combined feed.

I'm not sure how to pull this off without creating an individual String Replace and URL Builder for every URL. Ideally, I'd have one string replace (as it's static), and somehow emit the URLs in a Loop, but I can't seem figure out how to do so.

share|improve this question
add comment

1 Answer 1

I got this to work like so:

I set up a Private String with a comma-delimited list of URLs, piped into a String Tokenizer with the delimiter set to a comma.

String Tokenizer is piped into a Loop, which contains a String Replace, set to replace every "{REPLACE_ME}" with a given string (or content from a Text Input, in the example linked). This Loop is set to "assign output to..." an extra parameter.

Pipe that Loop into another Loop, containing a Fetch Feed. In that Fetch Feed, use the automatic selector to select the parameter that the previous Loop was assigning the output to. This Loop should be set to "emit all results" and piped into a Create RSS.

(This may be the wrong way to do it, but I kept running into trouble, and this is how I got it to work)...

In the Create RSS element, use the automatic selectors to essentially duplicate the proper fields... so "title" would be "item.title", etc.

Since we're combining multiple feeds, pipe that output into a Sort, and sort by 'item.pubDate', descending, and pipe that to Pipe Output.

You can see an example of this working via: http://pipes.yahoo.com/pipes/pipe.info?_id=3f4ccb9029a4e786ebc56da197495222

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.