From b033358b726382ad12c23f6fabdda76e08fb637f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 15 Jan 2017 18:26:07 +0100 Subject: [PATCH] implemented downloading of audio&video streams --- coub-dl.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 coub-dl.py diff --git a/coub-dl.py b/coub-dl.py new file mode 100644 index 0000000..5ba74fd --- /dev/null +++ b/coub-dl.py @@ -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))