1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-05-23 21:00:28 +08:00

[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
Unverified
parent 77fb1cef0c
commit 262b8aecd6
+6 -2
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,