[PeerTube] Revert use of get() for title, files

This commit is contained in:
3risian 2020-01-11 12:55:13 +11:00 committed by GitHub
parent 39af4a84b0
commit 1ff43a42a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -514,10 +514,10 @@ class PeerTubeIE(InfoExtractor):
video = self._download_json(
'https://%s/api/v1/videos/%s' % (host, video_id), video_id)
title = video.get('name')
title = video['name']
formats = []
for file_ in video.get('files'):
for file_ in video['files']:
if not isinstance(file_, dict):
continue
file_url = url_or_none(file_.get('fileUrl'))