Learn R Programming

tuber (version 0.8.0)

get_captions: Get Captions of a Video

Description

A few of Youtube videos have caption tracks available from an older YouTube API. If that caption track is available, this function returns that, Or it returns caption track specified by id resource. Check list_caption_tracks for more information.

Usage

get_captions(video_id = NULL, lang = "en", id = NULL, ...)

Arguments

video_id
ID of the video whose captions are requested. Required. No default.
lang
Language of the caption; required; default is "en" (English)
id
String. id of the caption track that is being retrieved
Additional arguments passed to tuber_GET.

Value

String.

Examples

Run this code
## Not run: ------------------------------------
# 
# # Set API token via yt_oauth() first
# 
# get_captions(video_id="yJXTXN4xrI8")
# get_captions(id="y3ElXcEME3lSISz6izkWVT5GvxjPu8pA")
## ---------------------------------------------

Run the code above in your browser using DataLab