我该如何处理rvest中的Connection拒绝错误?

时间:2018-09-13 15:09:33

标签: r web-scraping rvest

这是我的代码:

pkgs <- c("rvest", "urltools")
sapply(pkgs, library, character.only = T)
name <- 'cry'
url1 = URLencode(paste0('https://www.google.co.za/search?q=',name))
htmlpage <- html_session(url1)

不幸的是,我收到以下错误:

Error in curl::curl_fetch_memory(url, handle = handle) : Failed to connect to www.google.co.za port 443: Connection refused

该错误该怎么办?

0 个答案:

没有答案