I've finally written a script that saves YouTube videos you are viewing. It's a bash script attached (grab, you can save it as grab.sh) + index file maker (indx), which at the moment blatantly uses digg.com/css/iphone.css stylesheet and should only be used as a preview of what could be in the future.
Requirements - Erica's utils (wget), lighttpd as server. The code is down in comments since I can't upload them neither as .sh nor as .txt:
As you might guess, this is my first bash script. It's quite self-explanatory. You use it like this:
# create directory ~/Sites/music
# download scripts to iphone (i assume it's somewhere like ~/grab.sh)
# open the file you want in youtube (don't have to wait to download)
# repeat for other files you want in youtube
# run bash ~/grab.sh or bash ~/grab.sh "Song Name"
# it will automatically find cached links to recenly viewed movies from youtube, download them and erase cache
# the files go to ~/Sites/music as "Song Name[Length].m4v", so you'll be able to tell songs from each other even if you leave song name blank
# run bash ~/indx.sh
# point your browser to 127.0.0.1/music
# click on video to view it!