Skip to content

Form trouble with a relative path php #66

@conjugateprior

Description

@conjugateprior

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions