顯示具有 Rcurl 標籤的文章。 顯示所有文章
顯示具有 Rcurl 標籤的文章。 顯示所有文章

2015/10/7

RCurl 設定 SSL 驗證 [R]


例如:

library(RCurl)
getURL("https://www.python.org"  )

會得到
* Error in function (type, msg, asError = TRUE) : error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

調整為:

library(RCurl)
getURL("https://www.python.org" ,   ssl.verifypeer = FALSE)

則可取回 Html 文件