Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:rtype: None
"""
if 'captions' not in self.player_config_args['player_response']:
return
# https://github.com/nficano/pytube/issues/167
caption_tracks = (
self.player_config_args
.get('player_response', {})
.get('captions', {})
.get('playerCaptionsTracklistRenderer', {})
.get('captionTracks', [])
)
for caption_track in caption_tracks:
self.caption_tracks.append(Caption(caption_track))
:rtype: None
"""
if 'captions' not in self.player_config_args['player_response']:
return
# https://github.com/nficano/pytube/issues/167
caption_tracks = (
self.player_config_args
.get('player_response', {})
.get('captions', {})
.get('playerCaptionsTracklistRenderer', {})
.get('captionTracks', [])
)
for caption_track in caption_tracks:
self.caption_tracks.append(Caption(caption_track))
:rtype: None
"""
if 'captions' not in self.player_config_args['player_response']:
return
# https://github.com/nficano/pytube/issues/167
caption_tracks = (
self.player_config_args
.get('player_response', {})
.get('captions', {})
.get('playerCaptionsTracklistRenderer', {})
.get('captionTracks', [])
)
for caption_track in caption_tracks:
self.caption_tracks.append(Caption(caption_track))