[PeerTube] Handle case where captions page does not exist
This commit is contained in:
parent
d3d850f0e1
commit
7ea039df34
@ -489,6 +489,8 @@ class PeerTubeIE(InfoExtractor):
|
||||
def _get_subtitles(self, host, video_id):
|
||||
video_captions = self._download_json(
|
||||
'https://%s/api/v1/videos/%s/captions' % (host, video_id), video_id, fatal=False)
|
||||
if not video_captions:
|
||||
return None
|
||||
|
||||
subtitles = {}
|
||||
for entry in video_captions.get('data'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user