aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/minoto.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2018-05-16 19:11:48 +0100
committerRemita Amine <remitamine@gmail.com>2018-05-16 19:11:48 +0100
commit1306f5ed726b9f8778a5cc0586436b555f64c2ff (patch)
tree568ab16df7b81f3af572f499f6e1d4cc4604af96 /youtube_dl/extractor/minoto.py
parent58a68d8fdae5358273ee52d05d77fe42094e128e (diff)
[mychannels] add support for mychannels.com(closes #15334)
Diffstat (limited to 'youtube_dl/extractor/minoto.py')
-rw-r--r--youtube_dl/extractor/minoto.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/youtube_dl/extractor/minoto.py b/youtube_dl/extractor/minoto.py
index 959a10589..636731195 100644
--- a/youtube_dl/extractor/minoto.py
+++ b/youtube_dl/extractor/minoto.py
@@ -4,7 +4,10 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import (
+ int_or_none,
+ parse_codecs,
+)
class MinotoIE(InfoExtractor):
@@ -26,7 +29,7 @@ class MinotoIE(InfoExtractor):
formats.extend(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
else:
fmt_profile = fmt.get('profile') or {}
- f = {
+ formats.append({
'format_id': fmt_profile.get('name-short'),
'format_note': fmt_profile.get('name'),
'url': fmt_url,
@@ -35,16 +38,8 @@ class MinotoIE(InfoExtractor):
'filesize': int_or_none(fmt.get('filesize')),
'width': int_or_none(fmt.get('width')),
'height': int_or_none(fmt.get('height')),
- }
- codecs = fmt.get('codecs')
- if codecs:
- codecs = codecs.split(',')
- if len(codecs) == 2:
- f.update({
- 'vcodec': codecs[0],
- 'acodec': codecs[1],
- })
- formats.append(f)
+ 'codecs': parse_codecs(fmt.get('codecs')),
+ })
self._sort_formats(formats)
return {