[extractor/youku] Fix extractor (#5622)

Closes #4456
Authored by: KurtBestor
This commit is contained in:
Kurt Bestor 2022-12-29 16:18:55 +09:00 committed by GitHub
parent a4d6ead30f
commit 06a9d68eb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,25 +96,35 @@ class YoukuIE(InfoExtractor):
'thumbnail': r're:^https?://.*', 'thumbnail': r're:^https?://.*',
'uploader': '明月庄主moon', 'uploader': '明月庄主moon',
'uploader_id': '38465621', 'uploader_id': '38465621',
'uploader_url': 'http://i.youku.com/u/UMTUzODYyNDg0', 'uploader_url': 'https://www.youku.com/profile/index/?uid=UMTUzODYyNDg0',
'tags': list, 'tags': list,
}, },
}, { }, {
'url': 'http://video.tudou.com/v/XMjIyNzAzMTQ4NA==.html?f=46177805', 'url': 'https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html',
'info_dict': { 'info_dict': {
'id': 'XMjIyNzAzMTQ4NA', 'id': 'XNTA2NTA0MjA1Mg',
'ext': 'mp4', 'ext': 'mp4',
'title': '卡马乔国足开大脚长传冲吊集锦', 'title': 'Minecraft我的世界建造超大巨型航空飞机菜鸟vs高手vs黑客',
'duration': 289, 'duration': 542.13,
'thumbnail': r're:^https?://.*', 'thumbnail': r're:^https?://.*',
'uploader': '阿卜杜拉之星', 'uploader': '波哥游戏解说',
'uploader_id': '2382249', 'uploader_id': '156688084',
'uploader_url': 'http://i.youku.com/u/UOTUyODk5Ng==', 'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjI2NzUyMzM2',
'tags': list, 'tags': list,
}, },
}, { }, {
'url': 'http://video.tudou.com/v/XMjE4ODI3OTg2MA==.html', 'url': 'https://v.youku.com/v_show/id_XNTE1MzczOTg4MA==.html',
'only_matching': True, '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 @staticmethod
@ -151,7 +161,7 @@ def _real_extract(self, url):
# request basic data # request basic data
basic_data_params = { basic_data_params = {
'vid': video_id, 'vid': video_id,
'ccode': '0532', 'ccode': '0524',
'client_ip': '192.168.1.1', 'client_ip': '192.168.1.1',
'utid': cna, 'utid': cna,
'client_ts': time.time() / 1000, 'client_ts': time.time() / 1000,