There's a few posts on downloading audio from YouTube using youtube-dl
, but none of them are concrete or too helpful. I'm wondering what the best way to do it from a Python script is.
For example, here's the README example for downloading videos:
import youtube_dl
ydl_opts = {}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])
Obviously if you just care about the audio, you'd rather not download the whole video...
Therefore, the youtube-dl source isn't very helpful
Any suggestions on how to script this?