Currently I'm working on a web crawler project with Rselenium, which needs to open about 100,000 webpages in turn and do the info collection :
url <- paste0("www.111", r0[ii],".com")
remDr$open()
remDr$navigate(url)
Seems that the most time-consuming portion of this process is opening a new webpage, especially loading ads, external links, etc. So how could I run this kind of R code within a specific duration (e.g., 2 seconds) and then stop it, and run the following info collection process? Thanks.