A video container (file) is essentially a collection of video, audio and subtitle tracks and a register where to find what in the container, so that one can extract any of them.
You can download a youtube video with youtube-dl and one of the GUI projects that use it, once it's on your drive then you can use Audacity with the ffmpeg plugin to open that video and automatically get only the audio track(s) from it.
In Audacity you can label gaps and after that multi export each song as a batch from that track. In audacity one can resample, edit, export as many different audio containers (mp2, mp3, flac, ogg, etc...)