There is a utility called youtube-dl that you may or may not have seen mentioned online. Here is a rundown of how I am now using it to manage all my YouTube videos I want to watch
Thanks to Jason @Burk for the write-up on how to create an offline YouTube library. I’ve now implemented it myself. Good stuff.