[ie/mediasite] Fix slide extraction

This commit is contained in:
kclauhk 2024-10-29 22:49:12 +08:00
parent f101e5d34c
commit 1766a102bd

View file

@ -86,6 +86,23 @@ class MediasiteIE(InfoExtractor):
'duration': 7794, 'duration': 7794,
}, },
}, },
{
'url': 'https://events7.mediasite.com/Mediasite/Play/a7812390a2d44739ae857527e05776091d',
'info_dict': {
'id': 'a7812390a2d44739ae857527e05776091d',
'ext': 'mp4',
'title': 'Practical Prevention, Detection and Responses to the New Threat Landscape',
'description': r're:^The bad guys arent standing still, and neither is Okta',
'thumbnail': 'https://events7.mediasite.com/Mediasite/FileServer/Presentation/a7812390a2d44739ae857527e05776091d/16e2f205-41a7-4ea5-a031-5c6152afc7bf.jpg?playbackTicket=be2577e1d1fa4629abc0a2f56465b1a7',
'cast': ['Franklin Rosado', 'Alex Bovee'],
'duration': 2415.487,
'timestamp': 1472567400,
'upload_date': '20160830',
},
'params': {
'skip_download': True,
},
},
{ {
'url': 'https://collegerama.tudelft.nl/Mediasite/Showcase/livebroadcast/Presentation/ada7020854f743c49fbb45c9ec7dbb351d', 'url': 'https://collegerama.tudelft.nl/Mediasite/Showcase/livebroadcast/Presentation/ada7020854f743c49fbb45c9ec7dbb351d',
'only_matching': True, 'only_matching': True,
@ -243,8 +260,8 @@ def _real_extract(self, url):
'ext': ext, 'ext': ext,
}) })
images = traverse_obj(player_options, ('PlayerLayoutOptions', 'Images', {dict})) images = traverse_obj(player_options, ('PlayerLayoutOptions', 'Images', {dict}), default={})
if stream.get('HasSlideContent') and images: if stream.get('HasSlideContent'):
stream_formats.append(self.__extract_slides( stream_formats.append(self.__extract_slides(
stream_id=stream_id, stream_id=stream_id,
snum=snum, snum=snum,