Created
August 31, 2020 08:13
-
-
Save shubhpy/847a116ee013ae9dc2b4c25c869cc18c to your computer and use it in GitHub Desktop.
Download a list of Youtube Video's as MP3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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