ExtractorError,
int_or_none,
float_or_none,
+ try_get,
url_or_none,
)
'timestamp': 1501941939,
'upload_date': '20170805',
'uploader': 'Antw87',
+ 'duration': 12,
'like_count': int,
'dislike_count': int,
'comment_count': int,
'thumbnail': url_or_none(data.get('thumbnail')),
'timestamp': float_or_none(data.get('created_utc')),
'uploader': data.get('author'),
+ 'duration': int_or_none(try_get(
+ data,
+ (lambda x: x['media']['reddit_video']['duration'],
+ lambda x: x['secure_media']['reddit_video']['duration']))),
'like_count': int_or_none(data.get('ups')),
'dislike_count': int_or_none(data.get('downs')),
'comment_count': int_or_none(data.get('num_comments')),