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

Code before:
            mimetype = ext2mimetype(given_ext)
            if mimetype != 'image/gif' and mimetype.partition('/')[0] != 'video':
                continue
            entries.append({
                **parent,
                'id': compat_str(item.get('id')),
                'url': vid_url,
                'thumbnail': item.get('poster_url'),
                'subtitles': {
                    'jpn': [{
                        'url': item.get('vtt_url'),
                        'ext': 'vtt',
                    }]
                } if item.get('vtt_url') else None,
                'width': traverse_obj(item, ('information', 'width')),
                'height': traverse_obj(item, ('information', 'height')),
                'duration': traverse_obj(item, ('information', 'duration')),
                'filesize': traverse_obj(item, ('information', 'byte_size')),
                'fps': traverse_obj(item, ('information', 'frame_rate')),
                'ext': determine_ext(vid_url) or given_ext,
            })

        if not entries:
            raise ExtractorError('No video attachment found in this commission.', expected=True)
        elif len(entries) == 1:
            entries['id'] = parent['id']
            return entries[0]
        else:
            parent.update({
                '_type': 'multi_video',
                'entries': entries,
            })
            return parent


Review comment (bug):

Are you sure about this? If a new entry gets added to the URL, it shouldn't cause the id of the existing entry to change

PS: Also, this is wrong. Should be `entries[0]['id'] = ...`

Code after:
            'duration': 313,
            'fps': 30,
            'ext': 'mp4',
        },
    }, {
        'url': 'https://skeb.jp/@furukawa_nob/works/3',
        'info_dict': {
            'id': '489408',
            'title': 'いつもお世話になってお... by 古川ノブ@音楽とVlo...',
            'descripion': 'md5:5adc2e41d06d33b558bf7b1faeb7b9c2',
            'uploader': '古川ノブ@音楽とVlogのVtuber',
            'uploader_id': 'furukawa_nob',
            'age_limit': 0,
            'tags': [
                'よろしく', '大丈夫', 'お願い', 'でした',
                '是非', 'O', 'バー', '遊び', 'おはよう',
                'オーバ', 'ボイス',
            ],
            'url': r're:https://skeb.+',
            'thumbnail': r're:https://skeb.+',
            'subtitles': {
                'jpn': [{
                    'url': r're:https://skeb.+',
                    'ext': 'vtt'
                }]
            },
            'duration': 98,
            'ext': 'mp3',
            'vcodec': 'none',
            'abr': 128,
        },
    }, {
        'url': 'https://skeb.jp/@mollowmollow/works/6',
        'info_dict': {
            'id': '6',
            'title': 'ヒロ。\n\n私のキャラク... by 諸々',
            'descripion': 'md5:aa6cbf2ba320b50bce219632de195f07',
            '_type': 'playlist',
            'entries': [{
                'id': '486430',
                'title': 'ヒロ。\n\n私のキャラク... by 諸々',
                'descripion': 'md5:aa6cbf2ba320b50bce219632de195f07',
            }, {
                'id': '486431',
                'title': 'ヒロ。\n\n私のキャラク... by 諸々',
            }]
        }
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)