[redbulltv] Change [key] to .get(key) to comply with coding conventions

(For optional keys only)
This commit is contained in:
Ganden Schaffner 2019-08-10 12:56:03 -07:00
parent 77fb1cef0c
commit 262b8aecd6
No known key found for this signature in database
GPG Key ID: AAF2420F20D8B553

View File

@ -148,11 +148,15 @@ class RedBullTVIE(InfoExtractor):
subheading = metadata2.get('subheading')
if subheading:
title += ' - %s' % subheading
long_description = metadata2.get('long_description')
short_description = metadata2.get('short_description')
duration = float_or_none(metadata2.get('duration'), scale=1000)
release_date = metadata['analytics']['asset']['publishDate'][:10] \
.replace('-', '')
release_date = metadata.get('analytics', {}).get('asset', {}).get('publishDate')
if release_date:
release_date = release_date[:10].replace('-', '')
return {
'id': video_id,