aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/teamcoco.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-05-27 14:51:18 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-05-27 14:51:18 +0800
commitf9f3e3df9a9fff1b00c7184234c4f607ea3cec81 (patch)
treedabb2c7bfdb29b1827726becf00631b8eca69d9d /youtube_dl/extractor/teamcoco.py
parentf8d5e1cfb5d9a8c946a966452d9b86c45182a952 (diff)
downloadyoutube-dl-f9f3e3df9a9fff1b00c7184234c4f607ea3cec81.tar.xz
[teamcoco] Use determine_ext to determine the video type
Some videos does not contain a 'type' field (#5798)
Diffstat (limited to 'youtube_dl/extractor/teamcoco.py')
-rw-r--r--youtube_dl/extractor/teamcoco.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py
index 56be52638..b2a4b1fc0 100644
--- a/youtube_dl/extractor/teamcoco.py
+++ b/youtube_dl/extractor/teamcoco.py
@@ -10,6 +10,7 @@ from .common import InfoExtractor
from ..utils import (
ExtractorError,
qualities,
+ determine_ext,
)
from ..compat import compat_ord
@@ -108,7 +109,7 @@ class TeamcocoIE(InfoExtractor):
formats = []
get_quality = qualities(['500k', '480p', '1000k', '720p', '1080p'])
for filed in data['files']:
- if filed['type'] == 'hls':
+ if determine_ext(filed['url']) == 'm3u8':
formats.extend(self._extract_m3u8_formats(
filed['url'], video_id, ext='mp4'))
else: