Best way to rip music from www.youtube.com in Ubuntu

Download videos:
Use Video DownloadHelper extention for Firefox to download videos as .flv or .mp4. (however its conversion functionality is buggy)

Rip video to mp3:
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install ffmpeg
sudo apt-get install winff

Now find winff in Applications -> Sound and Video and use the GUI to rip the videos you have downloaded.