You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to download [the full] dynamically expanded [holdings] table using rvest, but am getting an Unknown field names error.
s<- html_session("http://innovatoretfs.com/etf/?ticker=ffty")
f<- html_form(s)[[1]]
#the following line fails:f.new<- set_values(f, `__EVENTTARGET`="ctl00$BodyPlaceHolder$ViewHoldingsLinkButton")
##subsequent lines are not tested##doc<- submit_form(s, f.new)
tabs<- xml_find_all(doc, "//table")
holdings<- html_table(tabs, fill=T, trim=T)[[5]]
I'm not great with HTML/HTTP but from what i can chase through, it seems to me that to expand the table requires a postback of the form with this new field value set
after inspecting the set_values function, it seems that it only allows existing fields to be assigned values.
is there any way to add a new field and a submit button to a form with rvest?
The text was updated successfully, but these errors were encountered:
Hmmm, the problem is that this is currently an error, presumably because I want to help avoid accidentally setting the wrong values. That seems reasonable to me, so I think this request is out of scope for rvest. (But I am currently reconsidering the whole flow of the form submission process so it's possible I might change my mind)
It would be great if one could add new fields to a form. I have a situation where the website I'm scraping from uses a progressive sequence of submits and the javascript adds the new field before submitting at each step so it isn't in the original form. If I could add to the form, it would work.
Perhaps something like html_form_add_field(form,"blah"=3)
I'm trying to download [the full] dynamically expanded [holdings] table using
rvest
, but am getting an Unknown field names error.I'm not great with HTML/HTTP but from what i can chase through, it seems to me that to expand the table requires a postback of the form with this new field value set
after inspecting the
set_values
function, it seems that it only allows existing fields to be assigned values.is there any way to add a new field and a submit button to a form with
rvest
?The text was updated successfully, but these errors were encountered: