added hotfix to youtube-dl's coub video bug: https://github.com/rg3/youtube-dl/issues/13754
This commit is contained in:
parent
0bf31633db
commit
1e7a5a2cf2
15
coub-dl.py
15
coub-dl.py
@ -91,6 +91,21 @@ def download_audio_stream(url, file_dict):
|
||||
|
||||
@call_verbose(before_message='Downloading video stream... ')
|
||||
def download_video_stream(url, file_dict):
|
||||
url = check_output(('youtube-dl',
|
||||
'--get-url', url)).decode('utf-8').strip()
|
||||
|
||||
curl = Popen(('curl', '--silent',
|
||||
'--write-out',
|
||||
'--location',
|
||||
url),
|
||||
stdout=PIPE)
|
||||
|
||||
grep = Popen(('grep', '--only-matching', '"http.*"'),
|
||||
stdin=curl.stdout, stdout=PIPE)
|
||||
|
||||
url = check_output(('sed', 's/muted_//g'),
|
||||
stdin=grep.stdout).decode('utf-8').strip().strip('"')
|
||||
|
||||
call(('youtube-dl', '--ignore-config',
|
||||
'--output', '{}.%(ext)s'.format(file_dict[Stream.VIDEO]),
|
||||
url),
|
||||
|
Loading…
Reference in New Issue
Block a user