From a0ef8556f3c67de1a631f89b89677c3049062ca9 Mon Sep 17 00:00:00 2001 From: Abdelrahman Mahmoud <20693584+Abdoam@users.noreply.github.com> Date: Mon, 1 Oct 2018 09:30:18 +0200 Subject: [PATCH] [pluralsight] Fix subtitles extraction Add try to fetch subtitles --- youtube_dl/extractor/pluralsight.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py index ec67381bb..9efb6d263 100644 --- a/youtube_dl/extractor/pluralsight.py +++ b/youtube_dl/extractor/pluralsight.py @@ -222,6 +222,12 @@ query viewClip { 'Downloading captions JSON', 'Unable to download captions JSON', fatal=False, data=json.dumps(captions_post).encode('utf-8'), headers={'Content-Type': 'application/json;charset=utf-8'}) + if not captions: + captions = self._download_json( + '%s/training/Player/captions' % self._API_BASE, video_id, + 'Downloading captions JSON', 'Unable to download captions JSON', + fatal=False, data=json.dumps(captions_post).encode('utf-8'), + headers={'Content-Type': 'application/json;charset=utf-8'}) if captions: return { lang: [{