Saturday, April 19, 2008

Direct Download YouTube Video

So why download a YouTube video when you can just stream it?
Sri Lanka is not best known for it's blazing internet speed (especially the "home" packages). I for one just got tired of looking at choppy video.

Works great if you want to use your videos with your own home brew player/organizer.


Why don't you just go to keepvid.com or use a browser plug-in?

What? Where's the fun in that?
Think command line, think quick launchers, think batch process. Exactly!

Screen scraping
101

This is what I needs to be done to get the download url:
http://www.walkernews.net/2008/02/25/youtube-video-direct-download-link/

This is how we go about doing it in C#:
Download Watch Video page


Parse it for the download Url (this is where the magic happens)

Parse it for the page title (more magic!)


Construct your final URL and That's It!

Download the source and try it out for yourself.

Look forward to a powershell version in the future.

No comments: