Created
March 5, 2018 03:51
-
-
Save twocity/d6f0b19fe15d2503a4b61cddcbc3131d to your computer and use it in GitHub Desktop.
download youtube audio through youtube-dl
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
from subprocess import call | |
import sys | |
cmd = 'youtube-dl --extract-audio --audio-format mp3 --audio-quality 0'.split(' ') | |
url = sys.argv[1] | |
cmd.append(url) | |
print('running {}'.format(' '.join(cmd))) | |
call(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python3 youtube-dl-mp3.py YOUTUBE-URL