3 Answers
3

Wrapping the URL in single quotation marks should do the trick. Also, you will want to give a name to the downloaded file as well (otherwise it will have the weird name that wget guessed from the URL). So

Explanation as per laebshade's comment (thanks for reminding me): The many funny characters in the URL will be interpreted by the shell as special commands or other control sequences. From the top of my head, ~ ! # ^ & * will all mean something else to the shell (depends on what shell you are using). You can use \ to escape them one by one, or quote the whole thing.

It would be good to explain the reason for using quotes. The reason it's not giving you the right URL is because the URL contains an '&' (ampersand) character, which your shell interprets as a fork() to background; in other words, your shell sends the first part of the command wget http://youtube.com/results?search_type=videos& to the background, then treats the next part of the "command" as a new one, until it reaches another &, and so on and so forth.
–
laebshadeJul 17 '11 at 14:38

Use youtube-dl for downloading Youtube videos. It's a epic python script. It req's Python. If you have Ubuntu, install with this command: sudo apt-get install youtube-dl otherwise you can directly download it from the website: http://rg3.github.com/youtube-dl/