mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
vevo: fixing naming when there are featured artists
This commit is contained in:
parent
8eb7b5c3f1
commit
8b27d83e4e
1 changed files with 27 additions and 4 deletions
|
@ -91,14 +91,30 @@ class VevoIE(VevoBaseIE):
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'USUV71503000',
|
'id': 'USUV71503000',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'K Camp - Till I Die',
|
'title': 'K Camp ft. T.I. - Till I Die',
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
'timestamp': 1449468000,
|
'timestamp': 1449468000,
|
||||||
'upload_date': '20151207',
|
'upload_date': '20151207',
|
||||||
'uploader': 'K Camp',
|
'uploader': 'K Camp',
|
||||||
'track': 'Till I Die',
|
'track': 'Till I Die',
|
||||||
'artist': 'K Camp',
|
'artist': 'K Camp',
|
||||||
'genre': 'Rap/Hip-Hop',
|
'genre': 'Hip-Hop',
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'note': 'Featured test',
|
||||||
|
'url': 'https://www.vevo.com/watch/lemaitre/Wait/USUV71402190',
|
||||||
|
'md5': 'd28675e5e8805035d949dc5cf161071d',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'USUV71402190',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Lemaitre ft. LoLo - Wait',
|
||||||
|
'age_limit': 0,
|
||||||
|
'timestamp': 1413432000,
|
||||||
|
'upload_date': '20141016',
|
||||||
|
'uploader': 'Lemaitre',
|
||||||
|
'track': 'Wait',
|
||||||
|
'artist': 'Lemaitre',
|
||||||
|
'genre': 'Electronic',
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'note': 'Only available via webpage',
|
'note': 'Only available via webpage',
|
||||||
|
@ -242,8 +258,15 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
timestamp = parse_iso8601(video_info.get('releaseDate'))
|
timestamp = parse_iso8601(video_info.get('releaseDate'))
|
||||||
artists = video_info.get('artists')
|
artists = video_info.get('artists')
|
||||||
if artists:
|
for curr_artist in artists:
|
||||||
artist = uploader = artists[0]['name']
|
if 'role' in curr_artist:
|
||||||
|
if curr_artist['role'] == 'Featured':
|
||||||
|
featured_artist = curr_artist['name']
|
||||||
|
elif curr_artist['role'] == 'Main':
|
||||||
|
artist = uploader = curr_artist['name']
|
||||||
|
else:
|
||||||
|
artist = uploader = curr_artist['name']
|
||||||
|
break
|
||||||
view_count = int_or_none(video_info.get('views', {}).get('total'))
|
view_count = int_or_none(video_info.get('views', {}).get('total'))
|
||||||
|
|
||||||
for video_version in video_versions:
|
for video_version in video_versions:
|
||||||
|
|
Loading…
Reference in a new issue