I use Rstudio server, and the packages RCurl and XML. I tried to scrape a webpage, but after having done it once successfully, I got the error message:
Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) :
couldn't connect to host
when trying to get the URL:
getURL(my_url, encoding="UTF-8", followLocation = TRUE)
Any ideas why this is happening?
Maybe you should try setting your RCurlOptions:
options(RCurlOptions = list(proxy = "my.proxy", proxyport = my.proxyport.number))
I hope it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.