I want a YouTube RSS filter
February 20, 2009 9:43 AM   Subscribe

I would like to take a given RSS feed (e.g. MetaFilter's feed), and create a derivative feed containing only the items with YouTube links in the content, with the destination URLs changed to the YouTube links (rather than the source of those links). Does something like this already exist? If not, what's the simplest way to create it? I can write code if necessary, but would rather not if there's an alternative.

To give some context, I have a bunch of feeds (Hulu, video blogs, etc.) on a computer attached to my TV, and all of them allow me to click through to the destination URL and load a video immediately. I'd like to be able to do the same with various feeds that only sometimes point to YouTube videos.
posted by scottreynen to Computers & Internet (6 answers total) 4 users marked this as a favorite
Best answer: Sounds like a job for Yahoo Pipes. Though I don't have a specific example for you.
posted by csimpkins at 9:50 AM on February 20, 2009

I was doing something somewhat similar and found this helpful. Its instructions for using a perl script with the module XML::RSS.
You could definitely use this to extract the urls, then you could check if its host is www.youtube.com.
posted by alkupe at 10:00 AM on February 20, 2009

Best answer: Not a great example, but Yahoo Pipes is the way to go:
posted by jdlugo at 10:05 AM on February 20, 2009

Best answer: I'll second Yahoo Pipes. It can take a source (which can be an existing feed or just a web page) and break it up into items for a feed. You can pass it through a regexp pipe to filter out URLs that aren't YouTube.

If you do end up starting with a site to convert to RSS, make sure you do a little research on RSS first. I didn't and bludgeoning the data into an acceptable feed became more tedious than setting up my filters was. Basically you'll need to add in an item.pubDate to each item. item.name or title (can't remember) is useful too. I couldn't figure out how to extract text from my source to insert later as a title, but I'm sure it can be done.
posted by valadil at 10:08 AM on February 20, 2009

Response by poster: Yeah, Yahoo Pipes seemed a likely solution. It would, of course, be easier if someone had already done this. I didn't find anything by searching. Having never used Pipes before, I've gotten as far as filtering down to only items that include YouTube links, but I'm still working on changing the link for each item to that YouTube link. Looks doable, I just need to learn how Pipes works.
posted by scottreynen at 10:16 AM on February 20, 2009

Response by poster: I got it working. Yahoo Pipes is much nicer than I realized. Thanks everyone.
posted by scottreynen at 11:02 AM on February 20, 2009 [1 favorite]

« Older How do I tell my girlfriend I want to be a father?   |   So I'm Giving My Boss Zip-Ties for his Birthday... Newer »
This thread is closed to new comments.