In Yahoo Pipes, is there any way to copy an item field into fields from a different feed?
If not, is it possible to turn an item field into text? That would also solve my problem.
What I'm trying to do
Starting with an HTML page structured like this:
html
head
title = "Title"
body
article = "First"
article = "Second"
article = "Third"
I want to create an RSS feed like this:
article
description = "Title"
content = "First"
article
description = "Title"
content = "Second"
article
description = "Title"
content = "Third"
The problem
The tricky part is the title. I can get it using XPath Fetch Page, but it comes through as an Item. But then I need to apply it to the articles (obtained with a separate XPath Fetch Page) and every module that can do this requires its input to be text.
For example, have a look at this pipe. I want to wire the output of the rightmost XPath Fetch Page module, to the second text input of the Regex module.
What I really need is a module that takes an Item as input and outputs Text, but there's no such module.
The other option would be to have some module that takes two feeds as input and lets me copy fields from one to the other. I have read vague reports of being able to do something like this by putting Text modules inside a Loop module, but I haven't been able to make that work. Is there any other way of doing what I want?
You can do this by using two pipes:
The first feed will extract the title like you did, and then use a loop for each title (so only one item in this case) to call the other pipe, passing in the same url and the extracted title. This way the second pipe will have all the info it needs to create the right RSS items, with the received title and the extracted items.
I created an example for you:
http://pipes.yahoo.com/pipes/pipe.info?_id=a9713cf1be0e9de533b12e977264fab7