diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-05-07 18:12:01 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-05-07 18:12:01 +0800 |
commit | 84bf31aaf8b9b7397de5f3189295d93e8e93e5e2 (patch) | |
tree | b5ad5b97d36935f48b65f98ba1ef9d639625f6ba /youtube_dl | |
parent | 05d5392cdaa558dba285c328182d4f3e82fb8e8b (diff) |
[ooyala] Extract m3u8 information (#2292)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/ooyala.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/youtube_dl/extractor/ooyala.py b/youtube_dl/extractor/ooyala.py index d5b05c18f..b33e8230d 100644 --- a/youtube_dl/extractor/ooyala.py +++ b/youtube_dl/extractor/ooyala.py @@ -6,6 +6,7 @@ from .common import InfoExtractor from ..utils import ( unescapeHTML, ExtractorError, + determine_ext, ) @@ -44,11 +45,21 @@ class OoyalaIE(InfoExtractor): ie=cls.ie_key()) def _extract_result(self, info, more_info): + embedCode = info['embedCode'] + video_url = info.get('ipad_url') or info['url'] + + if determine_ext(video_url) == 'm3u8': + formats = self._extract_m3u8_formats(video_url, embedCode, ext='mp4') + else: + formats = [{ + 'url': video_url, + 'ext': 'mp4', + }] + return { - 'id': info['embedCode'], - 'ext': 'mp4', + 'id': embedCode, 'title': unescapeHTML(info['title']), - 'url': info.get('ipad_url') or info['url'], + 'formats': formats, 'description': unescapeHTML(more_info['description']), 'thumbnail': more_info['promo'], } |