]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/olympics.py
[ie/crunchyroll] Fix stream extraction (#10005)
[yt-dlp.git] / yt_dlp / extractor / olympics.py
index 0aad836faf52d6f901f46280be792d372dfaeca0..61d1f404863fd0c9a15e08d60621353c5277807e 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
 from ..utils import (
     int_or_none,
@@ -19,6 +16,7 @@ class OlympicsReplayIE(InfoExtractor):
             'upload_date': '20210801',
             'timestamp': 1627783200,
             'description': 'md5:c66af4a5bc7429dbcc43d15845ff03b3',
+            'uploader': 'International Olympic Committee',
         },
         'params': {
             'skip_download': True,
@@ -55,16 +53,13 @@ def _real_extract(self, url):
             })
         m3u8_url = self._download_json(
             f'https://olympics.com/tokenGenerator?url={m3u8_url}', uuid, note='Downloading m3u8 url')
-        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, uuid, m3u8_id='hls')
-        self._sort_formats(formats)
+        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, uuid, 'mp4', m3u8_id='hls')
 
         return {
             'id': uuid,
             'title': title,
-            'timestamp': json_ld.get('timestamp'),
-            'description': json_ld.get('description'),
             'thumbnails': thumbnails,
-            'duration': json_ld.get('duration'),
             'formats': formats,
             'subtitles': subtitles,
+            **json_ld
         }