我尝试使用此代码登录网站
your.username <- 'six-sigma@six-sigma- consult.com'
your.password <- 'my password'
your.link <- 'https://login.xing.com/login'
require(SAScii)
require(RCurl)
require(XML)
agent="Firefox/61.0.1"
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
curl = getCurlHandle()
curlSetOpt(cookiejar = 'cookies.txt',useragent = agent,followlocation = TRUE,autoreferer = TRUE,curl = curl)
params <-
list(
'userAgent' = agent,
'screenWidth' = "",
'screenHeight' = "",
'flashMajor' = "",
'flashMinor' = "",
'flashBuild' = "",
'flashPatch' = "",
'redirect' = "",
'referrer' = your.link,
'txtEmail' = your.username,
'txtPassword' = your.password
)
html = postForm(your.link, .params = params, curl = curl)
html
此代码有效,但未显示错误消息。 如何验证登录是否成功?
有人知道关于如何登录网页的不同方法的很好的教程吗?