How to pass ssl_verifypeer to Rvest?

I am trying to use Rvest to clear a table from an internal web page here in $ JOB. I used the methods listed here to get xpath, etc.

My code is pretty simple:

library(httr)
library(rvest)
un = "username"; pw = "password"

thexpath <- "//*[@id="theFormOnThePage"]/fieldset/table"    

url1 <- "https://biglonghairyURL.do?blah=yadda"

stuff1 <- read_html(url1, authenticate(un, pw))

This results in the error: "The peer certificate cannot be authenticated using CA certificates."

Leaving aside the incompatibility of certificates, I see that you can use httr to avoid ssl checking using set_config(config(ssl_verifypeer = 0L)).

It works just peachy if I use GET (url1) from httr, but the thing is to automate table cleanup with rvest.

PDF Rvest httr, , Rvest httr curl, httr config().

, , ( ?) ssl_verifypeer = 0L rvest:: read_html?

:

stuff1 <- read_html(url1, authenticate(un, pw), ssl_verifypeer = 0L)) 
stuff1 <- read_html(url1, authenticate(un, pw), config(ssl_verifypeer = 0L))) 
stuff1 <- with_config(config = config(ssl_verifypeer = 0L), read_html(url1, authenticate(un, pw)))

: " peer CA".

, , ?

- RSelenium, , java / ( VP) .

.

+4

Source: https://habr.com/ru/post/1622382/


All Articles