import pafy url = 'your url here' video = pafy.new(url) audio = video.getbestaudio() audio.download()