I am trying to extract comments from 5000 videos from Youtube's API. My code works perfectly when I download 5 videos or more but when I plug the entire list of videos that I want, it throws the below error after running for hours. I am not sure what it means or if it is a memory problem. Thank you!
Line of code in R:
comments_1 <- CollectDataYoutube(video1,key,writeToFile = FALSE)
video1: is a list of 5 thousand videos codes that I have so that the API extracts comments from it directly.
key: is my API key stored in an object
Error message:
Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: Send failure: Connection was reset