Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/slideslive.py (Python)

Code before:

        slides, slides_xml = None, None
        slide_url_template = self._JPG_SLIDE_TMPL
        chapters, thumbnails = [], []
        if url_or_none(player_info.get('thumbnail')):
            thumbnails.append({'url': player_info['thumbnail']})

        if player_info.get('slides_json_url'):
            slides = traverse_obj(self._download_json(
                player_info['slides_json_url'], video_id, fatal=False,
                note='Downloading slides JSON', errnote=False), 'slides', expected_type=list)
        if slides:
            if re.match(r'.+(/v[45]/).+', player_info['slides_json_url']):
                slide_url_template = self._PNG_SLIDE_TMPL
            for i in range(len(slides)):
                slide_name = traverse_obj(slides, (i, 'image', 'name'))
                slide_id = str(i + 1)
                if slide_name:
                    thumbnails.append({
                        'id': slide_id,
                        'url': slide_url_template % (video_id, slide_name),
                    })
                chapters.append({
                    'title': slide_id,
                    'start_time': int_or_none(traverse_obj(slides, (i, 'time')), scale=1000)
                })

        if not slides and player_info.get('slides_xml_url'):
            slides_xml = self._download_xml(
                player_info['slides_xml_url'], video_id, fatal=False,
                note='Downloading slides XML', errnote='Failed to download slides info')
            if re.match(r'.+(/v[45]/).+', player_info['slides_xml_url']):
                slide_url_template = self._PNG_SLIDE_TMPL
            for slide in slides_xml.findall('./slide') if slides_xml else []:
                slide_name = xpath_text(slide, './slideName', 'name')
                slide_id = xpath_text(slide, './orderId', 'id')
                if slide_name:
                    thumbnails.append({
                        'id': slide_id,
                        'url': slide_url_template % (video_id, slide_name),
                    })
                chapters.append({
                    'title': slide_id,
                    'start_time': int_or_none(xpath_text(slide, './timeSec', 'time')),
                })

        subtitles = {}
        for sub in traverse_obj(player_info, ('subtitles', ...), expected_type=dict):
            webvtt_url = url_or_none(sub.get('webvtt_url'))
            if not webvtt_url:
                continue

Review comment (suggestion):
```suggestion
            for slide in slides:
                slide_name = traverse_obj(slide, ('image', 'name'))
                if slide_name:
                    thumbnails.append({
                        'url': slide_url_template % (video_id, slide_name),
                    })
                chapters.append({
                    'start_time': int_or_none(slide.get('time'), scale=1000)
                })
```

Code after:
            'like_count': int,
            'view_count': int,
            'thumbnail': r're:^https?://.*\.(?:jpg|png|webp)',
            'thumbnails': 'count:21',
            'chapters': 'count:20',
        },
        'params': {
            'skip_download': 'm3u8',
        },
    }, {
        # service_name = yoda
        'url': 'https://slideslive.com/38903721/magic-a-scientific-resurrection-of-an-esoteric-legend',
        'only_matching': True,
    }, {
        # dead link, service_name = url
        'url': 'https://slideslive.com/38922070/learning-transferable-skills-1',
        'only_matching': True,
    }, {
        # dead link, service_name = vimeo
        'url': 'https://slideslive.com/38921896/retrospectives-a-venue-for-selfreflection-in-ml-research-3',
        'only_matching': True,
    }]

    _WEBPAGE_TESTS = [{
        # only XML slides info
        'url': 'https://iclr.cc/virtual_2020/poster_Hklr204Fvr.html',
        'info_dict': {
            'id': '38925850',
            'ext': 'mp4',
            'title': 'Towards a Deep Network Architecture for Structured Smoothness',
            'thumbnail': r're:^https?://.*\.jpg',
            'thumbnails': 'count:8',
            'timestamp': 1629671508,
            'upload_date': '20210822',
            'chapters': 'count:7',
        },
        'params': {
            'skip_download': 'm3u8',
        },
    }]

    @classmethod
    def _extract_embed_urls(cls, url, webpage):
        # Reference: https://slideslive.com/embed_presentation.js
        for embed_id in re.findall(r'(?s)new\s+SlidesLiveEmbed\s*\([^)]+\bpresentationId:\s*["\'](\d+)["\']', webpage):
            url_parsed = urllib.parse.urlparse(url)
            origin = f'{url_parsed.scheme}://{url_parsed.netloc}'
            yield update_url_query(
                f'https://slideslive.com/embed/presentation/{embed_id}', {
                    'embed_parent_url': url,
                    'embed_container_origin': origin,