There is a marvellous command line program/python library called youtube-dl which will let you download and convert to audio only from youtube & other sites.
Available for multiple platforms as written in python but there is a windows executable that includes python. You may also need to install Microsoft Visual C++ 2008 Redistributable Package and FFMPEG and have FFMPEG on your path or in the same directory as the youtube-dl executable.
For audio only simply call as: youtube-dl -x --audio-format MP3
url_of_item
e.g.:
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=otXGqU4LBEI
Would download and convert leaving you with: "I would walk 500 miles - The Proclaimers-otXGqU4LBEI.mp3"
The question of the legality of keeping such material is subject to the original material, the country you are in, the use the you make of it, etc., etc., ad nauseam.