View source: R/wc-html-nodes.R
wc_html_nodes | R Documentation |
Select nodes from web client active page html content
wc_html_nodes(wc_obj, css, xpath)
wc_obj |
a |
css , xpath |
Nodes to select. Supply one of css or xpath depending on whether you want to use a css or xpath 1.0 selector. |
## Not run:
wc <- web_client()
wc %>% wc_go("https://usa.gov/")
wc %>%
wc_html_nodes("a") %>%
sapply(wc_html_text)
wc %>%
wc_html_nodes(xpath=".//a") %>%
sapply(wc_html_text)
wc %>%
wc_html_nodes(xpath=".//a") %>%
sapply(wc_html_attr, "href")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.