[vevo] Simplify artists extraction

This commit is contained in:
Sergey M․ 2016-11-24 23:09:35 +07:00
parent 8b27d83e4e
commit e94eeb1dd3
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 2 additions and 6 deletions

View File

@ -259,14 +259,10 @@ class VevoIE(VevoBaseIE):
timestamp = parse_iso8601(video_info.get('releaseDate')) timestamp = parse_iso8601(video_info.get('releaseDate'))
artists = video_info.get('artists') artists = video_info.get('artists')
for curr_artist in artists: for curr_artist in artists:
if 'role' in curr_artist: if curr_artist.get('role') == 'Featured':
if curr_artist['role'] == 'Featured': featured_artist = curr_artist['name']
featured_artist = curr_artist['name']
elif curr_artist['role'] == 'Main':
artist = uploader = curr_artist['name']
else: else:
artist = uploader = curr_artist['name'] 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: