Parse Javascript, tag ID3 tags of MP3s problem


I’m a Ruby newb, eager to learn. I think I found a problem where Ruby
might be the right “glue” for the job. But I’m having trouble getting

General Problem:
I’m trying to tag ID3 tags of a bunch of MP3s based on data from the

Web data is in javascript format here:
(View that data via html here:

Javascript parser for ruby is here:

ID3 tagger is here:

I have already installed id3v2 via MacPorts and used it with success.

My thought is that I’d write something in Ruby that would use “curl”
to get the javascript, parse it, get the data I need and run the id3v2
command to update the ID3 tag. For example, the tempo of track 1 is
“144”. So I will tag the Beats Per Minute tag of track 1 with “144”
using this command:
/opt/local/bin/id3v2 --TBPM “144” /Library/WebServer/Documents/

So that’s the gist of it. Now, I’m trying to get that Javascript
parser working. I am running the example parse.rb file like this:
ruby parse.rb 1.js

It returns nothing. So I guess that .js contains no functions? Any

Any help is much appreciated!