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

Code before:
        'url': 'https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html',
        'info_dict': {
            'id': 'XNTA2NTA0MjA1Mg',
            'ext': 'mp4',
            'title': 'Minecraft我的世界：建造超大巨型航空飞机，菜鸟vs高手vs黑客',
            'duration': 542.13,
            'thumbnail': r're:^https?://.*',
            'uploader': '波哥游戏解说',
            'uploader_id': '156688084',
            'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjI2NzUyMzM2',
            'tags': list,
        },
    }, {
        'url': 'https://v.youku.com/v_show/id_XNTE1MzczOTg4MA==.html',
        'info_dict': {
            'id': 'XNTE1MzczOTg4MA',
            'ext': 'mp4',
            'title': '国产超A特工片',
            'duration': 362.97,
            'thumbnail': r're:^https?://.*',
            'uploader': '陈晓娟说历史',
            'uploader_id': '1640913339',
            'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjU2MzY1MzM1Ng==',
            'tags': list,
        },
    }]

    @staticmethod
    def get_ysuid():
        return '%d%s' % (int(time.time()), ''.join(
            random.choices(string.ascii_letters, k=3)))

    def get_format_name(self, fm):
        _dict = {
            '3gp': 'h6',
            '3gphd': 'h5',
            'flv': 'h4',
            'flvhd': 'h4',
            'mp4': 'h3',
            'mp4hd': 'h3',
            'mp4hd2': 'h4',
            'mp4hd3': 'h4',
            'hd2': 'h2',
            'hd3': 'h1',
        }
        return _dict.get(fm)

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

        self._set_cookie('youku.com', '__ysuid', self.get_ysuid())

Review comment (suggestion):
Don't delete this one since there is no replacement test and just add something like `'skip': '404'`

Code after:
        'params': {
            'videopassword': '100600',
        },
    }, {
        # /play/get.json contains streams with "channel_type":"tail"
        'url': 'http://v.youku.com/v_show/id_XOTUxMzg4NDMy.html',
        'info_dict': {
            'id': 'XOTUxMzg4NDMy',
            'ext': 'mp4',
            'title': '我的世界☆明月庄主☆车震猎杀☆杀人艺术Minecraft',
            'duration': 702.08,
            'thumbnail': r're:^https?://.*',
            'uploader': '明月庄主moon',
            'uploader_id': '38465621',
            'uploader_url': 'https://www.youku.com/profile/index/?uid=UMTUzODYyNDg0',
            'tags': list,
        },
    }, {
        'url': 'https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html',
        'info_dict': {
            'id': 'XNTA2NTA0MjA1Mg',
            'ext': 'mp4',
            'title': 'Minecraft我的世界：建造超大巨型航空飞机，菜鸟vs高手vs黑客',
            'duration': 542.13,
            'thumbnail': r're:^https?://.*',
            'uploader': '波哥游戏解说',
            'uploader_id': '156688084',
            'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjI2NzUyMzM2',
            'tags': list,
        },
    }, {
        'url': 'https://v.youku.com/v_show/id_XNTE1MzczOTg4MA==.html',
        'info_dict': {
            'id': 'XNTE1MzczOTg4MA',
            'ext': 'mp4',
            'title': '国产超A特工片',
            'duration': 362.97,
            'thumbnail': r're:^https?://.*',
            'uploader': '陈晓娟说历史',
            'uploader_id': '1640913339',
            'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjU2MzY1MzM1Ng==',
            'tags': list,
        },
    }]

    @staticmethod
    def get_ysuid():
        return '%d%s' % (int(time.time()), ''.join(
            random.choices(string.ascii_letters, k=3)))

    def get_format_name(self, fm):