I love feeds

Mon, 12 Feb 2007 @ 17:44:26 UT
added by Edoardo in changelog perl

Yes!
Feeds are simple to use and many well known web sites provides web services with a lot of different feed's flavours, so it's simple for everyone to find the favourite format and use it on web pages.

Recently I've used the personalized feeds from last.fm and flickr.com for adding some fun in the sidebar of the main page.

last.fm


I've got a profile there and now I use the recent tracks feed for showing the last 5 listened tracks.
There is a little problem with this feed, I've seen that it has a sort of validity time, if you don't play something for a while the feed returned is empty.
As workaround I use a caching system, if the feed returns some valid data, it is cached, thus the last tracks played are always available.

flickr.com


I've started to use Flickr to store and organize my photos and now I use the personalized public photos feed for adding the last 5 photos in the sidebar.
I've choosen the RSS 2.0 format which provides also the links to the 75x75 px thumbnails! Cool!

For both I use 2 Perl modules, LWP::Simple and XML::Simple.
With the first I download the feed, with the second I parse it and extract the data I need to feed the sidebar template...
Simple uh?!

Save to del.icio.us

No comments

Yours can be the first!

Post your comment

Write your comment to this item by compiling the form below.
Remember, the fields marked with the asterisk (*) are mandatory!

Personal data














Note:
The E-mail address is mandatory and used eventually only for reply. It will never be shown in any page of this website. If you check the `Remember me' flag all the data in this section will be stored in a cookie and shown again next time you'll come here.
Comment

Note:
In your comment you are allowed to use the following XHTML tags:
  • <a href="http:// ... " title=" ... " > ... </a>
  • <em> ... </em>
  • <img src="http:// ..." alt=" ... " />
  • <strong> ... </strong>
Checksum
88ca16