First you need youtube-dl tool or ‘cclive’ to download the Youtube .FLV file.
Then, download the Youtube stream.
python youtube-dl http://www.youtube.com/watch?v=lee7a55401e
Alternatively, you can use ‘cclive’ to download the youtube stream.
cclive http://www.youtube.com/watch?v=lee7a55401e
After that, use ffmpeg to extract the audio and encode it to MP3
ffmpeg -i lee7a55401e.flv vn -acodec libmp3lame -ab 128000 -ar 44100 lee7a55401e.mp3
Note: You need to install the restricted codecs in order to extract MP3 audio files.
Thanks Mohammad Bahathir Hashim for the tip!