Description Usage Arguments Value Examples
find_elements
scrapes a HTML page using rvest::html_elements
and
paths described in a chewie_instruction
object. If path
argument in
instruction doesn't find any results it will automatically switch to an
alternative_path
if it is described in instruction as well.
1 |
page |
a |
instruction |
a |
correspondent xml_node
or xml_nodeset
of the described path
/
alternative_path
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
sample_instruction <- instruction(
title = "price_header",
path = "h1:nth-of-type(1)",
selector = "css",
alternative_path = "h2:nth-of-type(2)",
parse_as = "text"
)
sample_page <- rvest::read_html(response)
results <- find_elements(sample_page, sample_instruction)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.