The xpath-expression to find the interesting script-tag is now very liberal and loops through all script-tags. Also fixed a bug where if you set your own name on a file it weren't used.
Now the audio ripping part uses ffmpeg instead of lame+mplayer, less fidgity to get working! :) The Youtube URL fetching part has been extracted into a class, even if I doubt anyone will find this useful. From this release I'm using hpricot and htmlentities instead of regexps for dealing with the youtube html.
into a separate file.
…ms the videos don't go that high. So changed that to 160. Also changed to space, ' and " get shell escaped instead of hoping they won't show up.
…lso set the audio bitrate to 192 instead of 128.
…ownload. A quirk with this is since I keep the script "hacky" is that the pipe will get created in the movie download folder and then removed if the script ends normally. I see this as a quick'n'dirty solution to my watching/listening offline needs.
it should work on any unix like system that have ruby, mplayer and lame installed.