aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorAndrew J. Erickson <andy@bolt.me>2016-11-09 14:54:17 -0800
committerSergey M․ <dstftw@gmail.com>2016-11-24 23:07:28 +0700
commit8b27d83e4e07064898c5ec842e916c84cf7a1826 (patch)
treeb06b5ef082fd8e279df751674002521391b7d4f3 /youtube_dl
parent8eb7b5c3f170d8791d37ae980cd5024eba1c83c1 (diff)
vevo: fixing naming when there are featured artists
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/vevo.py31
1 files changed, 27 insertions, 4 deletions
diff --git a/youtube_dl/extractor/vevo.py b/youtube_dl/extractor/vevo.py
index 783efda7d..ce607945f 100644
--- a/youtube_dl/extractor/vevo.py
+++ b/youtube_dl/extractor/vevo.py
@@ -91,14 +91,30 @@ class VevoIE(VevoBaseIE):
'info_dict': {
'id': 'USUV71503000',
'ext': 'mp4',
- 'title': 'K Camp - Till I Die',
+ 'title': 'K Camp ft. T.I. - Till I Die',
'age_limit': 18,
'timestamp': 1449468000,
'upload_date': '20151207',
'uploader': 'K Camp',
'track': 'Till I Die',
'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',
@@ -242,8 +258,15 @@ class VevoIE(VevoBaseIE):
timestamp = parse_iso8601(video_info.get('releaseDate'))
artists = video_info.get('artists')
- if artists:
- artist = uploader = artists[0]['name']
+ for curr_artist in artists:
+ 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'))
for video_version in video_versions: