R:使用POST请求启动Rselenium吗?

时间:2019-05-12 20:40:59

标签: r selenium rvest httr rselenium

是否可以通过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

0 个答案:

没有答案