Search This Blog

Wednesday, January 21, 2009

wget example - to download a clip from you tube using the terminal

Use the address on the address bar in this command

1) wget -O /tmp/page.tmp http://www.youtube.com/watch?v=DwVZeCLEWrE
2) cat /tmp/page.tmp | grep video_id=
This will be the output
var fullscreenUrl = '/watch_fullscreen?video_id=UHvAXLBMWGI&l=51&t=OEgsToPDskKBFLkte03dOnia39Rzd63j&sk=7Ayx8rGROMLJrkh6LkXj7AC&fs=1&title=CompizFusion';
var relatedVideoGridUrl = '/related_ajax?video_id=UHvAXLBMWGI&view_type=G&watch3=1&search=compiz%20linux%20ubuntu';

var relatedVideoListUrl = '/related_ajax?video_id=UHvAXLBMWGI&view_type=L&watch3=1&search=compiz%20linux%20ubuntu';

Now use the video_id of first line.

3) wget -O /root/Desktop/clip.flv 'http://www.youtube.com/get_video?video_id=UHvAXLBMWGI&l=51&t=OEgsToPDskKBFLkte03dOnia39Rzd63j&sk=7Ayx8rGROMLJrkh6LkXj7AC&fs=1&title=CompizFusion'

This will download that particular video.

No comments:

Post a Comment