是否可以通过POST请求启动RSelenium? 我发现了这个问题:Is there any way to start with a POST request using Selenium?
但是,它有些旧,并且不专门针对RSelenium
。
library(RSelenium)
library(rvest)
url <- "https://www.ema.europa.eu/en/medicines"
pgsession<-html_session(url)
pgform<-html_form(pgsession)[[1]]
pgform
page<-rvest:::request_POST(pgsession,url,
body=list(
`op`="opioid"
),
encode="form")
rD <- rsDriver()
rD(page) #Obviously, this does not work, but I wonder if RSelenium could be started somehow from/with a post request