# NOT RUN {
# }
# NOT RUN {
## This example shows how to use `GetYoutubeVideoIDs` to extract video IDs from YouTube
## video URLs, and then collect data using the function `CollectDataYoutube`
# Use your own Google Developer API Key here:
myApiKey <- "1234567890"
# Authenticate with the Google API
apiKeyYoutube <- AuthenticateWithYoutubeAPI(apiKeyYoutube=myApiKey)
# Use the function `GetYoutubeVideoIDs` to automatically generate vector of IDs from
# a plain text file of video URLs
videoIDs <- GetYoutubeVideoIDs(file="youtube_to_scrape.txt")
# Collect the data using function `CollectDataYoutube`
myYoutubeData <- CollectDataYoutube(videoIDs,apiKeyYoutube,writeToFile=FALSE)
# }
Run the code above in your browser using DataLab