How to use the pytube.Caption function in pytube

To help you get started, we’ve selected a few pytube examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ksharindam / quartz-browser-qt5 / quartz_browser / pytube / __main__.py View on Github external
: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))
github nficano / pytube / pytube / __main__.py View on Github external
: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))
github rols1 / Kodi-Addon-ARDundZDF / resources / lib / pytube / __main__.py View on Github external
: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))