We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taking this example form:
require(rvest) ses <- html_session("https://www.handelsregister.de/rp_web/mask.do?Typ=e") form <- ses %>% html_form() %>% .[[1]] submit_form(ses, form, submit = 'foo')
submit_form exits with the error
submit_form
Error: Unknown submission name 'foo'. Possible values: bundeslandTH, schlagwortOptionen, ort
Looking at the form all three "Possible values" are no submit-buttons:
<input checkbox> 'bundeslandTH': <input radio> 'schlagwortOptionen': <input text> 'ort':
digging into submit_form and submit_request it turns out that there are form$fields that do not have a form$fields$type.
submit_request
form$fields
form$fields$type
rvest:::submit_request reads as follows:
rvest:::submit_request
is_submit <- function(x) tolower(x$type) %in% c("submit", "image", "button") submits <- Filter(is_submit, form$fields) if (length(submits) == 0) { stop("Could not find possible submission target.", call. = FALSE) } ...
As the form$fields$type is missing is_submit returns logical(0) which is not at all handled by Filter
is_submit
logical(0)
Filter
The text was updated successfully, but these errors were encountered:
Same issue at http://stackoverflow.com/questions/39443357/rvest-trouble-post-submission/39515073#39515073
Sorry, something went wrong.
Same issue at https://stackoverflow.com/questions/34830882/how-to-submit-login-form-in-rvest-package-w-o-button-argument
Correct checking for submit in submit_form (#161)
e656abe
Fixes #159
Successfully merging a pull request may close this issue.
Taking this example form:
submit_form
exits with the errorLooking at the form all three "Possible values" are no submit-buttons:
digging into
submit_form
andsubmit_request
it turns out that there areform$fields
that do not have aform$fields$type
.rvest:::submit_request
reads as follows:As the
form$fields$type
is missingis_submit
returnslogical(0)
which is not at all handled byFilter
The text was updated successfully, but these errors were encountered: