Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Rvest:如何在没有名称的窗体上设置值_Html_R_Web Scraping_Rvest - Fatal编程技术网

Html Rvest:如何在没有名称的窗体上设置值

Html Rvest:如何在没有名称的窗体上设置值,html,r,web-scraping,rvest,Html,R,Web Scraping,Rvest,我有一个表单,它具有以下特性——在本例中,“文本”是用户名框 form = html_form(read_html(url))[[1]] print(form) <form> 'login' (GET ) <input text> '': <input password> '': <input submit> '': log in > 我不知道如何在没有特定名称的情况下修改文本和密码参数。这不起作用,仅供参考: filled_

我有一个表单,它具有以下特性——在本例中,“文本”是用户名框

form = html_form(read_html(url))[[1]]
print(form)

<form> 'login' (GET )
  <input text> '':
  <input password> '':
  <input submit> '': log in
>
我不知道如何在没有特定名称的情况下修改文本和密码参数。这不起作用,仅供参考:

filled_form = set_values(form,
                         '' = "email@email.com",
                         '' = "p@ssword")
这也不起作用:

filled_form = set_values(form,
                         form$fields[1]$value = "email@email.com",
                         form$fields[2]$value ="p@ssword")

有什么想法吗?很抱歉,我无法共享URL。

好的,我通过在表单外部设置值来解决这个问题。但是,即使我更改表单$URL,仍然会遇到此错误<代码>在xml2::url\u absolute(表单$url,会话$url)中提交时出现“NULL”错误:与STRSXP:[type=NULL]不兼容。
filled_form = set_values(form,
                         form$fields[1]$value = "email@email.com",
                         form$fields[2]$value ="p@ssword")