read_html.selenider_session | R Documentation |
xml2::read_html()
can be used on a selenider session to read the HTML of
the entire page, or on a selenider element to get the HTML of that element.
read_html.selenider_session(
x,
encoding = "",
...,
options = c("RECOVER", "NOERROR", "NOBLANKS")
)
read_html.selenider_element(
x,
encoding = "",
timeout = NULL,
outer = TRUE,
...,
options = c("RECOVER", "NOERROR", "NOBLANKS")
)
x |
A |
encoding , ... , options |
Passed into |
timeout |
How long to wait for |
outer |
Whether to read the inner (all children of the current element)
or outer (including the element itself) HTML of |
read_html()
returns an XML document. Note that HTML will always be wrapped
in a <html>
and <body>
tag, if it isn't already.
library(rvest)
html <- "
<div>
<p>Example text</p>
</div>
"
session <- minimal_selenider_session(html)
read_html(session)
read_html(s("div"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.