# NOT RUN {
html <- read_html("http://www.google.com")
search <- html_form(html)[[1]]
search <- search %>% html_form_set(q = "My little pony", hl = "fr")
# Or if you have a list of values, use !!!
vals <- list(q = "web scraping", hl = "en")
search <- search %>% html_form_set(!!!vals)
# To submit and get result:
# }
# NOT RUN {
resp <- html_form_submit(search)
read_html(resp)
# }
Run the code above in your browser using DataLab