我试着登录到这个页面,但是我得到了以下错误:
错误:未知字段名: customeremail,customerpassword
我的密码是:
library(XLConnect)
library(rvest)
{
{
#Address of the login webpage
url <-"https://www.silversanz.com/es/account/login"
}
#create a web session with the desired login address
pgsession<-html_session(url)
pgform<-html_form(pgsession)
filled_form<-set_values(pgform,
'customer[email]'="mymail",
'customer[password]'="mypass"
)
{
url<-("https://www.silversanz.com/mi-cuenta/pedidos")
}
dades<-read_html(url)
date<-dades %>% html_nodes("dd") %>% html_attr("order__date")
total<-dades %>% html_nodes("dd") %>% html_attr("order__total")
state<-dades %>% html_nodes("dd") %>% html_attr("order__state")
info<-as.data.frame(cbind(date,state,total))
info<-info[!is.na(info$id),]
info<-info[!duplicated(info),]
writeWorksheetToFile(file="C:/Users/...",
data=info,
sheet="item",
clearSheets=TRUE
)
}你能帮帮我吗?
预先多谢:-)
发布于 2019-03-19 15:08:57
网页上有三种形式。当您访问pgform时,可以看到这一点。因此,您必须指定要使用的对象。我想,您想要登录,这是第一个:
filled_form<-set_values(pgform[[1]],
'customer[email]'="mymail",
'customer[password]'="mypass")https://stackoverflow.com/questions/55239109
复制相似问题