Audacity has a Line-Out recording feature which records whatever plays out of your PC.
But ...
For YouTube why don't you download the video itself ?!
Via *www.youtubex.com/ or *keepvid.com/ or *javimoya.com/blog/youtube_en.php (Extension) or *www.downloadandsaveyoutubevideos.info/ or even *www.zamzar.com/ !