wc_html_nodes: Select nodes from web client active page html content

Description Usage Arguments Examples

View source: R/wc-html-nodes.R

Description

Select nodes from web client active page html content

Usage

1
wc_html_nodes(wc_obj, css, xpath)

Arguments

wc_obj

a webclient object

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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)

hrbrmstr/htmlunit documentation built on Aug. 19, 2020, 3:05 p.m.