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...
The youtube-dl source is only so helpful (ie, not very).
Any suggestions how to script this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…