Description Usage Arguments Examples
View source: R/videoListDownload.R
Download YouTube videos/audios by providing an URL seed, which is any URL in a video list.
1 2 3 4 5 6 7 8 9 10 | videoListDownload(
urlSeed,
path = "./",
saveFileList = TRUE,
sleepTime = 10,
maxDownload = 1000,
priority = c("audio only", "best", "mp4"),
bothVideoAudio = TRUE,
webmConvert = NULL
)
|
path |
the path to save video/audio files. |
sleepTime |
numeric, the time to pause to prevent YouTube blocking. The default is 10 second |
priority |
the file format to download. The option can be any one (or combination) of "mp4", "best", "audio only", "mp3", "webm", the default is c("mp4", "best", "audio only"), which means the downloader will look for mp4 file first, if this file does not exist, then the downloader will look for the best file marked by YouTube, then look for only audio file. |
bothVideoAudio |
logic, whether download both audio and video,
it should be FALSE if only downloading audio or video. The default
is |
webmConvert |
either NULL (not convert), "mp4" or "mp3", convert webm file format to "mp4" or "mp3". The default is NULL. |
fileList |
the file name of video/audio list table. This table
is a csv file generated by |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | {
## Not run:
url0 = "https://www.youtube.com/watch?v=DejHQYAGb7Q&list=PLkDaE6sCZn6F6wUI9tvS_Gw1vaFAx6rd6"
# the folder to save downloaded files
folder = "/data/surfDrive/TutorialVideos/"
# #### download video
newFolder = videoListDownload(urlSeed = url0, path = folder,
saveFileList = TRUE,
sleepTime = 5, maxDownload = 200,
bothVideoAudio = TRUE)
# #### download audio
newFolder = videoListDownload(urlSeed = url0, path = folder,
saveFileList = TRUE,
sleepTime = 5, maxDownload = 200,
priority = c("audio only"),
bothVideoAudio = FALSE,
webmConvert = "mp3")
## End(Not run)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.