RCurl,错误:无法连接到主机
我使用 Rstudio 服务器以及 RCurl 和 XML 包。我尝试抓取网页,但成功完成一次后,收到错误消息:
Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) :
couldn't connect to host
尝试获取 URL 时:
getURL(my_url, encoding="UTF-8", followLocation = TRUE)
任何想法为什么会发生这种情况?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许你应该尝试设置你的 RCurlOptions:
我希望它有帮助。
Maybe you should try setting your RCurlOptions:
I hope it helps.