youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit f9f3e3df9a9fff1b00c7184234c4f607ea3cec81
parent f8d5e1cfb5d9a8c946a966452d9b86c45182a952
Author: Yen Chi Hsuan <yan12125@gmail.com>
Date:   Wed, 27 May 2015 14:51:18 +0800

[teamcoco] Use determine_ext to determine the video type

Some videos does not contain a 'type' field (#5798)

Diffstat:
Myoutube_dl/extractor/teamcoco.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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: