There are many, many things you did wrong, starting right here:
Quote:
I developed this You Tube Downloader program
Downloading YouTube videos is against YouTube terms and conditions, and counts as malicious activity. We do not condone, support, or assist in the production of malicious code in any way, form, or manner. This is a professional site for professional developers.
If you want to know how to create such things, you need to visit a hacking site: but be sure to disable all firewalls and antivirus products first or they won't trust you enough to tell you.
The second thing you did wrong is be rude: dumping 180 lines of unformatted code and saying "fix that" is not considered polite.
The third thing you did wrong is simple: you didn't bother to ask yourself "does YouTube protect it's material at all?"
And the answer is "Yes". "Yes it does".
YouTube works very hard to prevent downloaders from working: that's why there are so few out there, and most of those you do find currently don't work any more, because YouTube has found the "hole" they were using and closed it. It's their IP, it's their revenue stream - and they protect it with gusto!