Skip to content
New issue

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

Form trouble with a relative path php #66

Closed
conjugateprior opened this issue Feb 14, 2015 · 0 comments
Closed

Form trouble with a relative path php #66

conjugateprior opened this issue Feb 14, 2015 · 0 comments

Comments

@conjugateprior
Copy link

With rvest 0.2 there seems to be a problem with the following simple looking site

url <- "http://stateoftheunion.onetwothree.net/texts/index.html"
sess <- html_session(url)

form <- html_form(html(url)) %>%.[[1]] %>% set_values(query="freedom") 

This generates the form

<form> '<unnamed>' (GET ../search/search.php)
  <input text> 'query': freedom
  <input submit> 'submit': Search
  <input hidden> 'search': 1

which is fine, but

submit_form(sess, form)

generates

Error: length(url) == 1 is not TRUE 

And it's true. url turns into a three element vector right after the build_url call shown in the screenshot here:
trouble-at-mill

@hadley hadley closed this as completed in 8874e27 Apr 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant