How to skip page if request response is 404 in R?

Viewed 114

I'm scraping a website and getting 404 error. I use tryCatch() but it doesn't work. How can I skip this page/url using it or any method you can suggest?

result = tryCatch(expr = {
  map_dfr(
    .x = url,
    .f = function(x) {
      tibble(
        #expr
      )
    }
  )
  
})

Thanks in advance.

0 Answers
Related