mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 09:56:38 -05:00
[youku] Change video_id and add a multipart test case
This commit is contained in:
parent
ee69799262
commit
f1e66cb2eb
@ -25,13 +25,20 @@ class YoukuIE(InfoExtractor):
|
|||||||
'url': 'http://v.youku.com/v_show/id_XMTc1ODE5Njcy.html',
|
'url': 'http://v.youku.com/v_show/id_XMTc1ODE5Njcy.html',
|
||||||
'md5': '5f3af4192eabacc4501508d54a8cabd7',
|
'md5': '5f3af4192eabacc4501508d54a8cabd7',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'XMTc1ODE5Njcy',
|
'id': 'XMTc1ODE5Njcy_part1',
|
||||||
'title': '★Smile﹗♡ Git Fresh -Booty Music舞蹈.',
|
'title': '★Smile﹗♡ Git Fresh -Booty Music舞蹈.',
|
||||||
'ext': 'flv'
|
'ext': 'flv'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://player.youku.com/player.php/sid/XNDgyMDQ2NTQw/v.swf',
|
'url': 'http://player.youku.com/player.php/sid/XNDgyMDQ2NTQw/v.swf',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'http://v.youku.com/v_show/id_XODgxNjg1Mzk2_ev_1.html',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'XODgxNjg1Mzk2',
|
||||||
|
'title': '武媚娘传奇 85',
|
||||||
|
},
|
||||||
|
'playlist_count': 11,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def construct_video_urls(self, data1, data2):
|
def construct_video_urls(self, data1, data2):
|
||||||
@ -201,20 +208,14 @@ class YoukuIE(InfoExtractor):
|
|||||||
for i in range(len(entries)):
|
for i in range(len(entries)):
|
||||||
entries[i].update(
|
entries[i].update(
|
||||||
{
|
{
|
||||||
'id': '_part%d' % (i + 1),
|
'id': '%s_part%d' % (video_id, i + 1),
|
||||||
'title': title,
|
'title': title,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(entries) > 1:
|
return {
|
||||||
info = {
|
|
||||||
'_type': 'multi_video',
|
'_type': 'multi_video',
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'entries': entries,
|
'entries': entries,
|
||||||
}
|
}
|
||||||
else:
|
|
||||||
info = entries[0]
|
|
||||||
info['id'] = video_id
|
|
||||||
|
|
||||||
return info
|
|
||||||
|
Loading…
Reference in New Issue
Block a user