2008-08-04

Adding audio enclosures to feeds with Yahoo Pipes

I just finished my second "pipe" using Yahoo Pipes. If you haven't looked into Pipes, I strongly recommend it, because it is a testament of capabilities the web just didn't have until recently. It's main use is manipulating RSS feeds to create new feeds. Also, a pipe can make feeds from scraping web pages. Instead of editing source code as text, you insert graphical modules and fill in values to configure them. Then, whatever a module outputs can flow into the next module and the next, until finally the output is produced. Both of the pipes I created solve the same problem, adding audio enclosures to a music feed that was lacking them. I had to identify a pattern between the information in a feed entry and the URL of the MP3 file. The first one, Newgrounds weekly audio winners (original feed, my version, pipe page), was easy. All I had to do was copy the link and change "listen" to "download".



An experienced Pipes developer could make this in 2 minutes. But I have no idea what I'm doing, so it took me a couple hours of trial and error. The second one, remix.kwed.org (original feed, my version, pipe page), was a little more complicated. The link is http://remix.kwed.org/?search={id}. The MP3 is located at http://remix.kwed.org/{id}/{title}.mp3. Still not too bad, though, since all of the information was right in the feed, so no page scraping was necessary.

I still don't think I understand how to really use Pipes, as I am used to textual coding rather than visual. Maybe they will make it even easier to use in successive versions, assuming Yahoo isn't disbanded, with all of its cool apps sent to the scrap heap. But for now, if there's a quick hack you wish for involving feeds, and you don't feel like opening up a new programming project and figuring out how to host it, Pipes is your best bet.

No comments: