Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Just use http instead of https and that should solve your problem. Here is the output you get if you try this</p> <pre><code>forms = getHTMLFormDescription("http://www.dmv.ca.gov/wasapp/FeeCalculatorWeb/vlfForm.do", dropButtons = TRUE) </code></pre> <p>[[1]] HTML Form: <a href="http://search.ca.gov/search" rel="nofollow">http://search.ca.gov/search</a> q :[ Search DMV Site ] </p> <p>$feeRequestForm HTML Form: <a href="http://www.dmv.ca.gov/wasapp/FeeCalculatorWeb/vlfFees.do" rel="nofollow">http://www.dmv.ca.gov/wasapp/FeeCalculatorWeb/vlfFees.do</a> vehicleLicense :[ ]<br> vehicleTaxYear : vehicleVin :[ ]</p> <p>Here is an example of how to fill a form and get a data table from a yahoo sports page.</p> <pre><code># get form description url = 'http://ca.sports.yahoo.com/nhl/stats/byteam?cat=teamstats&amp;sort=404' forms = getHTMLFormDescription(url); # create a function using form description, to query the url efun = createFunction(forms[[3]]); # extract webpage by passing required arguments to function page = efun(year = 'season_2009', conference = 'Eastern'); # parse webpage and return html tree doc = htmlTreeParse(page, asText = T, useInternalNodes = T); # extract table from the html tree tab = readHTMLTable(doc); </code></pre> <p>I applied this to the webpage you specified, but for some reason the form element VehicleTaxYear is returned incorrectly which causes errors. Someone with a more in-depth knowledge of HTML forms would be able to guide you on how to debug this error.</p> <p>Hope this is useful</p> <p>EDIT. I fixed an error. It should be <code>createFunction(forms[[3]])</code>, since we are only interested in the third form.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload