For offline use (in whatever sense that term might be applicable to YouTube) I like clive for ripping the full video and ffmpeg for extracting the audio stream. Does your service use any such tools under the hood?
clive: http://clive.sourceforge.net/
ffmpeg -i "$in" -acodec libmp3lame -vn "$out"