Maybe you can have a try Leawo Music Recorder.
Leawo Music Recorder is a superb but easy-to-use music recording software program that lets you record free music from any built-in input audio, computer audio and online music sources, like YouTube, Spotify, AOL Music, Last.fm, etc. and then save in MP3 or WAV format with lossless quality.
The following simple step-by-step tuturial guide shows you how to record online audio file on Windows with Leawo Mucis Recorder. The turotial for recording online audio file on Mac is the same given that the user interface of Leawo Music Recorder is the same as that of its Windows counterpart. Therefore Mac users can get know-how below as well.
Step 1: Select audio source
Leawo Music Recorder could record both built-in input audios and computer audios. As you want to record online audio file, before recording, select "Record Computer Audio" in Audio Source settings panel, which could be invoked by clicking the "Audio Source" icon on the bottom-left corner.
Step 2...
For more detail, check:
https://www.leawo.org/tutorial/how-to-record-audio-from-the-internet.html