Enter your email address:

Delivered by FeedBurner

Download Youtube videos with wget


StumbleUpon Toolbar

Here there is an easy way to download Youtube videos using wget.

First thing we need is the video ID which we are going to get using also wget together with grep.

First locate the page of the video you want to download, I will use for this example one showing compizfusion in action.

wget -O /tmp/page.tmp http://www.youtube.com/watch?v=UHvAXLBMWGI

Then using cat and grep we will get the video ID

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';

Check that you have more than one Video_id, but only the first one is the one we want, check that the others says "relatedVideo", we do not want those ones.

Now download the video.

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

check out that I am sending the output to /tmp/video.flv you of course can use any other file and directory you may want, after this you can play the video with any player you usually use.

Trackback URL for this post:

http://www.go2linux.org/trackback/353
StumbleUpon Toolbar

 If you like this article, subscribe to our full rss

If this article was somehow useful for you, you can leave something in the tip's jar

Please post your question in our forum and use comments only to leave your comments about the article, thanks.

Why not just open your /tmp

Why not just open your /tmp folder and copy the file that appears there?
It will be called some random FL8Ks34G or something, but all you need to do is rename it, add .flv and you're laughing!

Thanks, I did not know that,

Thanks, I did not know that, nice!

Guillermo Garron

It doesn't work with my! NO

It doesn't work with my! NO sound! Both way just geting a crapy streaming!

If you want to download

If you want to download youtube videos with a graphical tool, one has become available... It allows you to download videos as: avi, mpeg, mp4, flv etc... and also you can set the preferred directory to store your videos.

Check it here:
http://yourtubedownloader.awardspace.com/

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

This site is proudly hosted at Bluefur Hosting