get_text: Retrieve text of a node given a css attribute or an XPath...

Description Usage Arguments Value Examples

View source: R/get_text.R

Description

Retrieve text of a node given a css attribute or an XPath request.

Usage

1
get_text(html, css, xpath, node = 1)

Arguments

html

Either a document, a node set or a single node.

css, xpath

Use either a css attribute or an XPath 1.0 request (not both).

node

If several nodes match your selection, select the one you want. Defaults to 1 (first node).

Value

The text of the node.

Examples

1
2
3
html %>% get_text(".nationality")

film %>% get_text(xpath = "//*[contains(@class, 'actors')]//span[last()]")

gaalcaras/socscrap documentation built on Jan. 1, 2021, 2:16 a.m.