I need a hand in generating a list of urls. I try to generate the list with the following lines in R Studio:
library(RCurl)
links_list = list()
for(j in 10:46) {
for(k in 10:99) {
urls <- c(paste0("https://www.tbmm.gov.tr/tutanaklar/TUTANAK/TBMM/d26/c0", j, "/tbmm260", j, "0", k, ".pdf")) #check 0
if(url.exists(urls) == TRUE)
links_list <- c(links_list, urls)
}
}
My aim is to skip the inexistent urls. Before using if, it worked well but the resut was a list of more than 3k urls most of which are inexistent.
I'm working on a PC with Windows but this code doesn't generate a list of urls. The list remains empty when the run is finished. I tried the same in a mac. It worked in a way but the running of the code did not stop.
I appreciate if anyone comes up with an idea!
Thanks...