I've been doing this for a few years now as I grew tired of video/audio getting removed without them leaving any trace of what the content was related to.
My current setup consists of several scripts on my personal server - basic CLI wrappers around "youtube-dl" (supports many sites, not just YouTube) - these scripts set my default preferences as well as the destination folder depending on the parameters passed.
Once the download is complete, the destination folder is just one of many paths scanned by my Plex instance. I can then pull up the video/audio on my television, computer or mobile device as I please.
Nothing fancy; basically what ravenstine said. If it's interesting, and I want to hold onto it, I youtube-dl it. Eventually it makes its way onto a USB backup drive.