aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-12 18:09:53 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-12 18:09:53 +0700
commit6310acf512136a1e37ef5905c4bdce8cf14ba5a5 (patch)
tree3af59d58de8d5be41f16d4722e73f1766bde87bc
parent8d38dafbbff2b4f5b414e2555f47ad9352fb83b4 (diff)
[youtube] Fix parsing codecs (closes #12091)
-rw-r--r--youtube_dl/extractor/youtube.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 76710931a..dec02804b 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -34,6 +34,7 @@ from ..utils import (
int_or_none,
mimetype2ext,
orderedSet,
+ parse_codecs,
parse_duration,
remove_quotes,
remove_start,
@@ -1696,15 +1697,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
codecs = mobj.group('val')
break
if codecs:
- codecs = codecs.split(',')
- if len(codecs) == 2:
- acodec, vcodec = codecs[1], codecs[0]
- else:
- acodec, vcodec = (codecs[0], 'none') if kind == 'audio' else ('none', codecs[0])
- dct.update({
- 'acodec': acodec,
- 'vcodec': vcodec,
- })
+ dct.update(parse_codecs(codecs))
formats.append(dct)
elif video_info.get('hlsvp'):
manifest_url = video_info['hlsvp'][0]