1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 05:53:12 +08:00

[pluralsight] Fix subtitles extraction

Add try to fetch subtitles
This commit is contained in:
Abdelrahman Mahmoud 2018-10-01 09:30:18 +02:00 committed by GitHub
parent 245cbb33bc
commit a0ef8556f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: [{