Description Usage Arguments Value Examples
View source: R/videoListTable.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 | videoListTable(
urlSeed,
path = "./",
saveFileList = TRUE,
sleepTime = 10,
maxDownload = 1000,
priority = c("audio only", "best", "mp4"),
bothVideoAudio = TRUE
)
|
path |
the path to save video/audio files. |
saveFileList |
logic, whether save the file table. |
sleepTime |
numeric, the time to pause to prevent YouTube blocking. The default is 10 second |
maxDownload |
integer, the maximal downloading. |
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 |
fileList |
the file name of video/audio list table. This table
is a csv file generated by |
a data.frame of video/audio list and write a csv table to 'path'. The columns of this table are 'rowNumber', 'Orders', 'VideoTitles', 'fileName', and 'URL', in which 'URL' is most important information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | {
## Not run:
url0 = "https://www.youtube.com/watch?v=DejHQYAGb7Q&list=PLkDaE6sCZn6F6wUI9tvS_Gw1vaFAx6rd6"
# the folder to save downloaded files
folder = "/data/surfDrive/TutorialVideos/"
# #### video file table
fileTable = videoListTable(urlSeed = url0, path = folder,
saveFileList = TRUE,
sleepTime = 5, maxDownload = 200,
bothVideoAudio = TRUE)
head(fileTable)
# #### audio file table
fileTable = videoListTable(urlSeed = url0, path = folder,
saveFileList = TRUE,
sleepTime = 5, maxDownload = 200,
priority = c("audio only"),
bothVideoAudio = FALSE)
head(fileTable)
## End(Not run)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.