I'm trying to do some webscraping, but for whatever reason, RSelenium won't connect and gives me the following error message:
Error in checkError(res) :
Undefined error in httr call. httr output: Failed to connect to localhost port 4444: Connection refused
Here's the relevant code I'm using
#packages
packages <- c("rvest",
"RSelenium",
"Rcrawler",
"stringr",
"dplyr",
"readxl",
"wdman")
packages.l <- length(packages)
#install packages
for (i in 1:packages.l) {
install.packages(packages[i])
}
#add to library
for (i in 1:packages.l) {
library(packages[i], character.only = TRUE)
}
remDr <- remoteDriver(browserName = "chrome")
remDr$open()
I'm new to all of this, so I have no idea what the error message means much less how to fix it.