YouTube recently shut down their v2 API and along with it, RSS feeds for searches. They now want you to use their v3 API, which is fine...if you want to spend a bunch of time building a full-blown application just to grab the latest search results on YouTube. Needless to say, I didn't really want to do that. So, I looked around for alternatives.

What I wanted to do was to set up a search like this, and add it to one of my channels in Feedly. Feedly is an RSS aggregator that you can then set up to send you email digests or automatically tweet for you using IFTTT. I know that sounds like a lot of tools, but it's really not that complicated.

Feed43 Creates RSS Feeds from Static HTML

The first step is to set up Feed43 with the YouTube search I wanted. Feed43 turns static web pages into RSS feeds, but you've got to do a bit of the configuration to make it work. When you create a feed on Feed43, the first thing you do is input the URL of the original page. For me it was a YouTube search results page, but you could also do this with a YouTube channel, user, or category.

Next, I clicked refresh to see the results. This brings up raw HTML, which is a bit hard to read, but after some searching, I found the titles of each video, which is what we need. If you hit CTRL+F your browser will bring up a search box and you can enter <h3 class="yt-lockup-title">. This is the <h3> tag that contains the title and a link to each video on YouTube. Now, to set up the search pattern for Feed43, I entered this line into the "Item Search Pattern:" box:

<h3 class="yt-lockup-title"><a href="{%}" class="{%}" data-sessionlink="{%}" title="{%}" aria-describedby="{%}" rel="{%}" dir="{%}">

Each of those {%} characters are variables that you can then use to add information to the feed you're creating. I really only need the ones for title and href, but since the others are part of the search pattern, I needed to include them. When you click "Extract" you should see an output of each video like this:

Now you just need to set up relationships between the variables and the RSS feed's output:

When you preview the feed, you should see an RSS feed and links to open the feed in a new browser window.

Adding to Feedly

Now that you've got a link to the RSS feed you created, you can go to Feedly and add it in the Search box in the top right. Here's the feed I ended up with. Now I've got a way to include YouTube videos in my daily email digests. If you create something cool with Feely and Feed43, let me know!