View source: R/wc-html-nodes.R
wc_html_text | R Documentation |
Extract attributes, text and tag name from webclient page html content
wc_html_text(dom_node, trim = FALSE)
wc_html_attr(dom_node, attr)
wc_html_name(dom_node)
dom_node |
a webclient page DOM node (likely produced by |
trim |
if |
attr |
name of attribute to retrieve |
## 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.