diff --git a/youtube_dl/extractor/peertube.py b/youtube_dl/extractor/peertube.py index 87c7fdf15..1b58a859b 100644 --- a/youtube_dl/extractor/peertube.py +++ b/youtube_dl/extractor/peertube.py @@ -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'):