All the current tutorials on making your own youtube video downloader are outdated. The whole token insertion from video info does not work, and neither does using the javascript method. Does anyone know of a way to do this currently without just downloading someone else's programs? I just want to know the method to go about so I can program my own (for fun :D)
Thanks in advance!
Why do you want to reinvent the wheel? use Rapidleech script!
Btw, if you still need to reinvent the wheel, here is source-code of the Youtube plugin of Rapidleech (it's highly readable:
As of 1/1/2018, the old technique described below doesn't seem to work reliably. Youtube's in-page variable structure seems to have changed and I haven't been able to figure out the updated version.
Here's an updated (June, 2017) version that works directly from the dev tools console available in any browser. Currently should work for any Youtube media type, including up to 4k if its available.
https://gist.github.com/geuis/8b1b2ea57d7f9a9ae22f80d4fbf5b97f
Sample output for https://www.youtube.com/watch?v=9bZkp7q19f0
As of today 15/06/2012 is really simple; but you have to be watch for future changes. Here it is (in Javascript)