Skip to content

Instantly share code, notes, and snippets.

@ozzyisgreat
Created September 27, 2020 18:14
Show Gist options
  • Save ozzyisgreat/0b8bf596a950c4f2bc12d7150bd23b49 to your computer and use it in GitHub Desktop.
Save ozzyisgreat/0b8bf596a950c4f2bc12d7150bd23b49 to your computer and use it in GitHub Desktop.
#install ffmpeg and youtube-dl and python3 (obviously)
#run with python3 <filename with extension> <youtube_url>
import youtube_dl
import sys
params ={
'format': 'bestaudio/best',
'postprocessors':[{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
youtube= youtube_dl.YoutubeDL(params)
youtube.download(sys.argv[1:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment