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

Code before:
        if not token:
            self.report_warning('Unable to extract auth token')
            return None
        return {'Authorization': f'Bearer {token}'}

    def _extract_video(self, data, display_id):
        formats = []
        video_data = traverse_obj(data, ('_embedded', 'video', '_embedded', {dict}))
        m3u8_url = traverse_obj(video_data, ('playlists', 0, '_links', 'related', 'href', {url_or_none}))
        if m3u8_url:
            formats.extend(self._extract_m3u8_formats(m3u8_url, display_id, 'mp4', m3u8_id='hls', fatal=False))
        mp4_entry = traverse_obj(video_data, ('video-outputs', lambda _, v: url_or_none(v['_links']['related']['href']), any))
        if mp4_entry:
            formats.append({
                'url': mp4_entry['_links']['related']['href'],
                'format_id': 'direct',
                'quality': 1,
                **traverse_obj(mp4_entry, {
                    'height': ('height', {int_or_none}),
                    'width': ('width', {int_or_none}),
                    'filesize': ('file_size', {int_or_none}),
                }),
            })
        return {
            'formats': formats,
            **traverse_obj(data, {
                'id': ('id', {str}),
                'title': ('title', {str}),
                'description': ('summary_text', {str}),
                'thumbnail': ('_embedded', 'images', 0, '_links', 'related', 'href', {url_or_none}),
                'duration': ('_embedded', 'video', 'duration', {int_or_none(scale=1000)}),
                'timestamp': ('date', {parse_iso8601}),
                'release_timestamp': ('published_at', {parse_iso8601}),
                'modified_timestamp': ('updated_at', {parse_iso8601}),
            }),
        }


class SubsplashIE(SubsplashBaseIE):
    _VALID_URL = [
        r'https?://(?:www\.)?subsplash\.com/u/[^/?#]+/media/d/(?P<id>\w+)',
        r'https?://(?:\w+\.)?subspla\.sh/(?P<id>\w+)',
    ]
    _TESTS = [{
        'url': 'https://subsplash.com/u/skywatchtv/media/d/5whnx5s-the-grand-delusion-taking-place-right-now',
        'md5': 'd468729814e533cec86f1da505dec82d',
        'info_dict': {
            'id': '33f8d305-68ab-414c-acf2-f2317a0abe21',
            'ext': 'mp4',
            'title': 'THE GRAND DELUSION TAKING PLACE RIGHT NOW!',
            'description': 'md5:220a630865c3697b0ec9dcb3a70cbc33',

Review comment (suggestion):
```suggestion
            'id': video_id,
            'formats': formats,
```

Code after:
        if not token:
            self.report_warning('Unable to extract auth token')
            return None
        return {'Authorization': f'Bearer {token}'}

    def _extract_video(self, data, video_id):
        formats = []
        video_data = traverse_obj(data, ('_embedded', 'video', '_embedded', {dict}))
        m3u8_url = traverse_obj(video_data, ('playlists', 0, '_links', 'related', 'href', {url_or_none}))
        if m3u8_url:
            formats.extend(self._extract_m3u8_formats(m3u8_url, video_id, 'mp4', m3u8_id='hls', fatal=False))
        mp4_entry = traverse_obj(video_data, ('video-outputs', lambda _, v: url_or_none(v['_links']['related']['href']), any))
        if mp4_entry:
            formats.append({
                'url': mp4_entry['_links']['related']['href'],
                'format_id': 'direct',
                'quality': 1,
                **traverse_obj(mp4_entry, {
                    'height': ('height', {int_or_none}),
                    'width': ('width', {int_or_none}),
                    'filesize': ('file_size', {int_or_none}),
                }),
            })
        return {
            'id': video_id,
            'formats': formats,
            **traverse_obj(data, {
                'title': ('title', {str}),
                'description': ('summary_text', {str}),
                'thumbnail': ('_embedded', 'images', 0, '_links', 'related', 'href', {url_or_none}),
                'duration': ('_embedded', 'video', 'duration', {int_or_none(scale=1000)}),
                'timestamp': ('date', {parse_iso8601}),
                'release_timestamp': ('published_at', {parse_iso8601}),
                'modified_timestamp': ('updated_at', {parse_iso8601}),
            }),
        }


class SubsplashIE(SubsplashBaseIE):
    _VALID_URL = [
        r'https?://(?:www\.)?subsplash\.com/(?:u/)?[^/?#]+/[^/?#]+/(?:d/|mi/\+)(?P<id>\w+)',
        r'https?://(?:\w+\.)?subspla\.sh/(?P<id>\w+)',
    ]
    _TESTS = [{
        'url': 'https://subsplash.com/u/skywatchtv/media/d/5whnx5s-the-grand-delusion-taking-place-right-now',
        'md5': 'd468729814e533cec86f1da505dec82d',
        'info_dict': {
            'id': '5whnx5s',
            'ext': 'mp4',
            'title': 'THE GRAND DELUSION TAKING PLACE RIGHT NOW!',
            'description': 'md5:220a630865c3697b0ec9dcb3a70cbc33',