(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Checking RSS Feeds


2009/03/07

My RSS feeds got screwed up again. That's a passive and evasive way of saying that *I* screwed up my feeds again. That's what I get for doing things while in the middle of having the flu; it's easy enough for me to screw up code when I'm healthy and alert - making changes while sick is just moronic.

I fixed it all up this morning but realized that I need something better to watch for this kind of screwup. After all, it's hardly the first time something has gone wrong and it's not even always my fault: the good folks at Feedburner have done their share now and then. I need a way to make sure my Feeds are really working.



Of course one way is to simply subscribe to your own feeds. If you see current data, you are all set. But if you don't, that doesn't necessarily mean something is wrong because the reader can be acting up on its own and not fetching current data.

You can quickly check a feed using a browser like Safari or Opera, but those too can get confused and refuse to fetch new data. More important for me is that I have a good number of feeds to check - I need a programmatic solution.

The Feedburner Awareness API is supposed to provide just the hooks needed. I've used that before to fetch RSS stats so my first thought was to look there. Indeed, the GetItemData call would seem to provide just what I want: a list of current feed items. Unfortunately, I couldn't get this to work. I don't know if it is just broken right now or if the documentation for the API is wrong, but I had no luck at all. I read the docs as indicating that "https://feedburner.google.com/api/awareness/1.0/GetItemData?uri=aplawrence/ZPYH" should return the XML file I want, but so far all that gets me is a "500" error. Oh well, I'll have to do it the hard way..

The hard way is actually fetching each feed and parsing it for the desired data. That's easy to pick out from a Feedburner feed: the lines I want begin with "<rdf:li".

A simple curl http://feeds2.feedburner.com/aplawrence/ZPYH | grep "<rdf:li" | head -1 will extract the latest feed item. I'll actual write something a bit more sophisticated so that I can compare that to what I know should be the latest item for the particular feed. That will at least make me aware of errors sooner than I might otherwise find them.




Click here to add your comments





Mon Apr 13 15:25:21 2009: Subject: testing the rss feed   anonymous

gravatar
my comments are for testing the rss feeds

my comments are for testing the rss feeds

my comments are for testing the rss feeds



Mon Apr 13 15:30:08 2009: Subject:   TonyLawrence

gravatar
What feed are you checking?

Comments feed? It doesn't update automatically - only when I tell it to. That keeps a lot of the spam junk out of the feed.

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



numly esn 14682-090307-639570-85
numly barcode

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

book graphic Internet Income guide

My Hard Truths about Easy Money on the Internet will show you how to make money on the Internet!

 I sell and support
 Kerio Mail server




pavatar.jpg
More:
       - Blogging
       - Web/HTML


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress