How to Create Custom RSS Feeds

If you’re interested in sharing or syndicating the articles that you write for your website, here’s how …

Real Simple Syndication (RSS) makes it a lot easier to keep up to date with the latest updates on Internet services and websites. Many websites nowadays offer RSS feeds to provide their readers with an alternative to visiting the site manually, or subscribing to an e-mail newsletter.

Feed readers like RSS Owl or the online service Google Reader are easy to use and act as a central hub for information for many users. Sometimes though, websites are encountered that do not offer RSS feeds. An example of such a website is the Google New service which publishes the latest Google product updates. The service itself is triggered by RSS, but visitors are not offered options to subscribe to a feed.

We have created a feed for that service using the free service Feed 43, and would like to guide you through the creation of a custom RSS feed. This should give you the tools at hand to create a feed on other websites that do not offer one.

A basic understanding of HTML is beneficial for this, but not necessarily required. Start by visiting the Feed 43 website, and paste the url of the web page that you want to create an RSS feed for in the form. We use http://www.google.com/newproducts/ for our example. Ignore Encoding and click the Reload button.

custom rss feed

custom rss feed

All configurations happen on the next page. At the top, the page title and source code are displayed to the user. We need the source code later on, to find patterns for the news title, description and link. That’s the most technical and intimidating step of the process, but not as hard as it looks on first glance.

rss feed

rss feed

The patterns are defined in step 2. Feed 43 uses the {%} variable to define variables, and {*} for contents that are not relevant. Now we need to delve into the source code, but before we do that, we look at the original page to retrieve title and description that we need to find in the source code.

Take a look at the first new product title at the page, and search the source code for it. For our Google New example that is “Elevation service now available in the”. You will find the text in the source, with HTML elements around it. Now, we replace the news item title with the {%} variable and add the whole line

<a href="http://www.google.com/newproducts/#" class="headline showbody">{%}</a>

to the Item (repeatable) Search Pattern* in step 2. But, if you look a bit closer, or more precisely search on you find that the title appears a second time in the source. This is unusual for most web pages, but in this case the second occurrence in the code is actually the right one. Why? Because the full text of each post is posted in that location as well.

For the article title, we choose

<div class="hidden-title">{%}</div>

and put the code in the Item (repeatable) Search Pattern field.

For the description, we look a line beneath and find

<div class="hidden-content">{%}<div class="blogger-post-footer">

The full code that we put into that field is

<div class="hidden-title">{%}</div>{*}
<div class="hidden-content">{%}<div class="blogger-post-footer">

See the {*}? This gets rid of everything in between the two fields. If you leave it out, you will notice that a click on Extract will find 0 items, if you add it, all items are found.

The clipped data below will show how each entry is displayed in the RSS feed. Take a note of the variables {1} and {2}, those are set to the title of the article and the description.

rss creation

rss creation

We need to add those two to the RSS Item properties. The first into the title field, and the second in the description field.

feed43

feed43

A click on preview finally displays how the RSS feed will look in the RSS reader.

preview feed

preview feed

Finally, the RSS feed address, and the edit page address are displayed to the creator of the custom RSS feed. And that’s how you create custom RSS feeds with Feed43. If you have any questions about the process, let us know in the comments.


© Martin for gHacks Technology News, 2010. | Permalink | Add to del.icio.us, digg, facebook, reddit, twitter
Post tags: , , , ,

Link to Original Content

For over 30 years, Western Telematic, Inc. (WTI) has been an innovator in the field of remote management for IT facilities. Our comprehensive product line includes a wide range of Serial Console Server products, Switched PDU products and Remote Reboot Switch products to provide secure, remote management of servers, routers and other devices.

Tags: , , , ,

Comments are closed.