I am trying to scrape the API for some information. I get about 300 or so in everytime I run my code before it stops with a "cannot open the connection" messagge. Was just wondering if anyone had any idea what was causing this issue and how it could be resolved?
Here is my code in R.
I have confirmed that when it is running it is gathering the data what seems to be 100% accurate
while (i < 76127) {
urltemp = paste(url1,i,url2, sep = "")
con = url(urltemp, "rb")
json = fromJSON(con)
new = tryCatch(data.frame(json), error=function(e) NULL)
Hi, I am a bit rusty in R and was wondering if I could have some assistance. I am trying to iterate through all the game pages and pull some information. I know how to get the URLs and how to handle the data once I get it into R, I just was having issues pulling the webpage into R as a JSON or XML file. Some help would be greatly appreciated.
Log in to comment