This commit is contained in:
Michael Forney 2020-10-21 15:57:01 +02:00 committed by GitHub
commit aeef8798b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 0 deletions

View File

@ -786,6 +786,7 @@ from .nzz import NZZIE
from .odatv import OdaTVIE
from .odnoklassniki import OdnoklassnikiIE
from .oktoberfesttv import OktoberfestTVIE
from .olympicchannel import OlympicChannelIE
from .ondemandkorea import OnDemandKoreaIE
from .onet import (
OnetIE,

View File

@ -0,0 +1,43 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import ExtractorError, unified_strdate
class OlympicChannelIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?olympicchannel\.com/../video/detail/(?P<id>[^/]+)'
_TEST = {
'url': 'https://www.olympicchannel.com/en/video/detail/men-s-halfpipe-finals-snowboard-pyeongchang-2018-replays/',
'info_dict': {
'id': '1789cf09-7143-4972-b822-16210fa1a4b1',
'ext': 'mp4',
'title': 'Men\'s Halfpipe Finals - Snowboard | PyeongChang 2018 Replays',
'description': 'The men\'s halfpipe finals were held at the Phoenix Snow Park on 14 February 2018.',
'release_date': '20180308',
'thumbnail': r're:^https?://.*',
}
}
def _real_extract(self, url):
display_id = self._match_id(url)
webpage = self._download_webpage(url, display_id)
video_id = self._html_search_meta('episode_uid', webpage)
title = self._html_search_meta('episode_title', webpage)
formats = self._extract_m3u8_formats(self._html_search_meta('video_url', webpage), video_id, 'mp4')
description = self._html_search_meta('episode_synopsis', webpage, fatal=False)
release_date = unified_strdate(self._html_search_meta('content_release_date_local_utc', webpage, fatal=False))
thumbnail = self._og_search_thumbnail(webpage)
self._sort_formats(formats)
return {
'id': video_id,
'display_id': display_id,
'title': title,
'formats': formats,
'description': description,
'release_date': release_date,
'thumbnail': thumbnail,
}