mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 15:46:54 +01:00
[ooyala] Extract m3u8 information (#2292)
This commit is contained in:
parent
05d5392cda
commit
84bf31aaf8
@ -6,6 +6,7 @@
|
|||||||
from ..utils import (
|
from ..utils import (
|
||||||
unescapeHTML,
|
unescapeHTML,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
determine_ext,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -44,11 +45,21 @@ def _build_url_result(cls, embed_code):
|
|||||||
ie=cls.ie_key())
|
ie=cls.ie_key())
|
||||||
|
|
||||||
def _extract_result(self, info, more_info):
|
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 {
|
return {
|
||||||
'id': info['embedCode'],
|
'id': embedCode,
|
||||||
'ext': 'mp4',
|
|
||||||
'title': unescapeHTML(info['title']),
|
'title': unescapeHTML(info['title']),
|
||||||
'url': info.get('ipad_url') or info['url'],
|
'formats': formats,
|
||||||
'description': unescapeHTML(more_info['description']),
|
'description': unescapeHTML(more_info['description']),
|
||||||
'thumbnail': more_info['promo'],
|
'thumbnail': more_info['promo'],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user