0

I am trying to set values with rvest for dynamic field names. So I retrieve the field name with the code below. f.account is a character of length one, containing a dynamic field name like OCmaCMFgHij

library(rvest)
url        <- "https://sv01.net-housting.de/user/index.php"
sp.session <- html_session(url)
f0         <- html_form(sp.session)
f.account  <- f0[[2]][['fields']][[1]]$name

Note: This is a little arbitrary example since f.account is not really dynamic in this case, but will always have the value username.

Now I want to set a fixed value to the field in the form with smth like this:

f1 <- set_values(f0, UQ(rlang::sym("f.account")) = "MyAccountName" ))

I tried to use the .dot statement or setNames as described here, but I have failed so far.

z-cool
  • 334
  • 1
  • 9

0 Answers0