Just a simple perl script to cycle through a list of rss feeds and pump out any media urls contained in the “enclosure element” of each item.

Here’s the basic code. I’ve also written a cgi version that prints the urls as hyperlinks (I’ll post that as soon as its been polished a bit more).

The heart of this script is the XML::FeedPP module.


use XML::FeedPP;

my @sources = (


foreach my $source(@sources) {

  my $feed = XML::FeedPP->new($source);
  my $title = $feed->title();
  print $title, "n";
  foreach my $item ( $feed->get_item() ) {
     my $medialink = $item->get('enclosure@url');
     my $pubdate = $item->pubDate();
     print $pubdate, "n";
     print $medialink, "n";
  print "n";

Output looks like this:

NBC Nightly News (video)

One thing I’d like to do with this is find a way to automate creating external link objects in mediatomb, the upnp media server software I run at home. All I need now is an example of how to create such an object via mediatomb’s javascript api.