coub-dl/coub-dl.py

16 lines
536 B
Python
Raw Normal View History

from subprocess import call, check_output, STDOUT
from re import match
from sys import argv
argv.append('https://coub.com/view/aeeuu')
AUDIO_FILE = 'audio'
VIDEO_FILE = 'video'
URL = argv[1] if len(argv) > 0 else ''
call(('/usr/bin/env', 'youtube-dl', '--extract-audio',
'--output', '{}.%(ext)s'.format(AUDIO_FILE),
URL))
call(('/usr/bin/env', 'youtube-dl', '--output', '{}.%(ext)s'.format(VIDEO_FILE),
URL))