make_yt_embed: make_yt_embed

View source: R/make_yt_embed.R

make_yt_embedR Documentation

make_yt_embed

Description

Internal helpers for compile_teach_it(). Get YT embed code from any Youtube link

Usage

make_yt_embed(link)

Arguments

link

a YouTube link

See Also

Other Internal helper functions: zcatchLinkNA(), zget_envir()

Examples

#Should give 4 URLs in format www.youtube.com/embed/videoID and 1 original URL (not on YT)
c("https://youtu.be/mD24yi7uLgU",
"https://youtu.be/ZAFjYJk27Ug?si=d-MIziNb39ib_8fW",
"https://www.youtube.com/watch?v=h5eTqjzQZDY",
"https://www.youtube.com/watch?v=Bk2APxqIhbk&t=1s",
"https://into-the-dark.galacticpolymath.com/") %>% make_yt_embed()
#should not change anything
make_yt_embed("https://www.youtube.com/embed/A2FBO8ofEac")


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.