Description Usage Arguments Details Value Examples
Use a JavaScript-enabled browser context to read and render HTML from a URL.
1 2 3 4 5 6 7 8 9 10 11 |
url |
URL to retrieve |
emulate |
browser to emulate; one of " |
ret |
what to return; if |
js_delay |
time (ms) to let loaded javascript to execute; default is 2 seconds (2000 ms) |
timeout |
overall timeout (ms); |
ignore_ssl_errors |
Should SSL/TLS errors be ignored. The default ( |
enable_dnt |
Enable the "Do Not Track" header. Default: |
download_images |
Download images as the page is loaded? Since this
function is a high-level wrapper designed to do a read of HTML,
it is recommended that you leave this the default |
options |
options to pass to |
For the code in the examples, this is the site that is being scraped:
Note that it has a table of values but it is rendered via JavaScript.
an xml2
html_document
/xml_document
if ret
== html_document
else
the HTML document text generated by HtmlUnit
.
1 2 3 4 5 | ## Not run:
test_url <- "https://hrbrmstr.github.io/htmlunitjars/index.html"
hu_read_html(test_url)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.