Question

I am merging two feeds using Yahoo pipes and using the output feed on a website. However, as would like to identify the "feed source" for each item in the output feed. Is it possible to manipulate the original feeds so I can add another node/element to the feed items?

Thanks

Was it helpful?

Solution

One way to do that is using the Regex operator. Let's say you want to add a new field called source. You could use Regex with parameters:

  • In: item.source
  • replace: .*
  • with: (the text you want)

See it in action here: http://pipes.yahoo.com/janos/7a3b9993cfc143d414fe7b637b1bd95a

That is, I have two feeds, I added a source attribute in the first with value "Question 1" and in the second with value "Question 2".

As an added bonus interesting undocumented Yahoo Pipes hack, I used one more Regex after the Union to make the source appear in the title.

However, this only adds the attribute to the node in the pipe debugger. You can use it for further processing, like I added it here to the title, it won't create a <source> tag in the output. That's because the RSS output of Yahoo Pipes removes all other fields that are not in the RSS standard. You can still see it in the JSON output though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top