Created
March 8, 2017 02:23
-
-
Save anonymous/75275303742be67064b2389d52649f2d to your computer and use it in GitHub Desktop.
Play audio from a youtube search in the terminal
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
#!/usr/bin/env python3 | |
from os import system | |
from sys import argv | |
# Example: | |
# youtube-terminal.py foo bar baz | |
# calls youtube-dl 'ytsearch:foo bar baz' --max-downloads 1 -o - | cvlc - --no-video | |
call = 'youtube-dl "ytsearch:{}" --max-downloads 1 -o - | cvlc - --no-video' | |
system(call.format(' '.join(argv[1:]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment