Sunday, October 14, 2007

Script to Automate Download Google Videos

I had to download a large number of google videos this week. But I was fade up with the pasting the url in to sites like then click on the download links then downlaod videos. I had a defined list of videos to be downlaoded, so I decided to write my own programm to download these files automatically from a commandline program.
My program reads the filename given in the commndline and then treats each line of the file as a google video entry and filename given separated by pipe.
Format is as shown bellow

# cat testurl.txt|testvdo.flv|testvdo2.flv
(testurl.txt can be downloaded from HERE

The python code is as given bellow

Python Code File
I am too lazy to format code in blogger post, so I have uploaded the file.

Save the python code as file name
make sure you have testurl.txt file with the google video urls, then run the code by command given bellow
python testurl.txt

Any suggestions welcome
Now Some LEGAL Crap

 Is this tool legal?

From "You may not send
automated queries of any sort to Google's system without express
permission in advance from Google."

This means that you should not use this tool to query Google without
advance express permission. Google appliances, however, do not have these
limitations. You should, however, obtain advance express permission from
the owner or maintainer of the Google appliance before searching it with
any automated tool for various legal and moral reasons.

The author wrote this tool not to violate Google's terms of service (ToS)
but to automate some of his work.


hobot said...

Thanks for linking me to this, I am always interested in learning :)

Myrna said...

Thanks for writing this.

neo said...

No Problemoooooooo :)