Learn R Programming

tuber (version 2.0.0)

list_captions: List Caption Tracks

Description

Lists caption-track metadata for a video. The caption text itself is returned by [download_caption()]. YouTube requires OAuth authorization for this method.

Usage

list_captions(
  video_id,
  caption_ids = NULL,
  part = "snippet",
  simplify = TRUE,
  ...
)

Value

A data frame when `simplify = TRUE`; otherwise a caption-list response.

Arguments

video_id

YouTube video ID.

caption_ids

Optional character vector of caption-track IDs to select.

part

Character vector of caption resource parts.

simplify

If `TRUE`, return a data frame; otherwise return the raw API response.

...

Additional arguments passed to [tuber_GET()].

References

https://developers.google.com/youtube/v3/docs/captions/list

Examples

Run this code
if (FALSE) {
list_captions(video_id = "M7FIvfx5J10")
}

Run the code above in your browser using DataLab