Description Usage Arguments Value Examples
instruction
provides the guidelines to chewie
scraping by setting all of
searching and returning object parameters.
1 2 3 4 5 6 7 8 9 10 | instruction(
title,
path,
selector = "css",
alternative_path = NULL,
parse_as = NULL,
pattern = NULL
)
instruction_set_result(x, result)
|
title |
an arbitrary name to the scraped object |
path |
a css or xpath path to the object to be scraped |
selector |
whether |
alternative_path |
an alternative css or xpath path to the object to be scraped |
parse_as |
indicates if an extractor should be applied to the resulting scraped item. Currently available extractors are:
|
pattern |
a RegEx pattern to be applied before parsing |
a chewie_instruction
object
1 2 3 4 5 6 7 | sample_instruction <- instruction(
title = "price_header",
selector = "css",
path = "h1:nth-of-type(1)",
alternative_path = "h2:nth-of-type(2)",
parse_as = "text"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.