Downloading Google Videos

I recently looked up a few videos by Randy Pausch, one was his ‘last lecture‘ and the other was on time management. The former was on Youtube and the other was on Google Videos.

The Youtube video was easy to download with youtube-dl on my Linux Mint Distro, (for how to do this, look up this simple tutorial) but I was stuck on the Google Video. Google Video apparently doesn’t have any download link and is not popular enough for developer to have tools designed for it yet.

I tried ‘Flash Video Resources Downloader’ firefox extension, but it open up a website which says that the flv file is not accessible. I finally had to give up on that and begin some frantic googling.

Jason Striegel at hackszine has made a cool script which seems to work excellent. I have the video downloading in the background at present. The file is 171 mb and the download speed is only like 15 kBps, so it is gonna take some time.

I just need to create a bookmark containing a certain javascript code. In Firefox, I cannot add a bookmark with the address entered manually, so i just bookmarked a page at random, then went to Bookmarks|Organize Bookmarks, selected the previously created bookmark and edited its properties to point to the script he mentions.

This is the exact command for Google Video
javascript:window.open(unescape(document.getElementById('VideoPlayback').src.match(/videoUrl=([^$)]*)/)[1]));

And this is for Youtube
javascript:window.open('http://youtube.com/get_video?video_id='+window.location.href.split('?')[1].match(/v=([^(&|$)]*)/)[1]+'&t='+document.getElementById('movie_player').src.match(/t=([^(&|$)]*)/)[1]);

On a side note, the file downloaded will be ‘get-video.flv’ at your default download location or wherever you ask it to download. I can foresee some problems with multiple video downloads in some situations, but firefox just appends a (#) at the end of the video so generally it should not be a problem.