implemented downloading of audio&video streams

This commit is contained in:
Kjistóf 2017-01-15 18:26:07 +01:00
parent e0e7eefcfb
commit b033358b72

15
coub-dl.py Normal file
View File

@ -0,0 +1,15 @@
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))