mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
[youtube] fix extraction of caption tracks, close #2866
This commit is contained in:
parent
81d416d1cd
commit
240b7a8111
@ -352,8 +352,11 @@ class YouTube(VideoExtractor):
|
||||
for _ in stream['signatureCipher'].split('&')]))
|
||||
|
||||
# Prepare caption tracks
|
||||
try:
|
||||
try:
|
||||
caption_tracks = json.loads(ytplayer_config['args']['player_response'])['captions']['playerCaptionsTracklistRenderer']['captionTracks']
|
||||
except:
|
||||
caption_tracks = ytInitialPlayerResponse['captions']['playerCaptionsTracklistRenderer']['captionTracks']
|
||||
for ct in caption_tracks:
|
||||
ttsurl, lang = ct['baseUrl'], ct['languageCode']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user