Skip to content

Instantly share code, notes, and snippets.

@shubhpy
Created August 31, 2020 08:13
Show Gist options
  • Save shubhpy/847a116ee013ae9dc2b4c25c869cc18c to your computer and use it in GitHub Desktop.
Save shubhpy/847a116ee013ae9dc2b4c25c869cc18c to your computer and use it in GitHub Desktop.
Download a list of Youtube Video's as MP3
# Setup Steps for Mac
# 1. sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
# 2. sudo chmod a+rx /usr/local/bin/youtube-dl
# 3. brew install ffmpeg
import subprocess
urls = [
"https://www.youtube.com/watch?v=ABCDEDFGH"
]
for url in urls:
subprocess.call([
"/usr/local/bin/youtube-dl",
"-x",
url,
"--audio-format",
"mp3",
"--audio-quality",
"0"
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment