get_css_element: Get css element from html page

Description Usage Arguments Details Value

Description

get_css_element gets a specific css element from a html page.

Usage

1
2
get_css_element(html, css, remove_chars = c(), as_numeric = FALSE,
  expecting_one = TRUE)

Arguments

html

Xml_document containing the html content of an advertisements page.

css

String indicating the css element to extract.

remove_chars

Vector indivating which characters are to be removed from the result.

as_numeric

Boolean indicating whether the result should be returned as numeric.

expecting_one

Boolean indicating whether a single result is expected or a vector of results.

Details

The function uses a css string to extract information from a specific html node of a html page.

Value

a character/numeric or vector object.


timvink/mpscraper documentation built on May 31, 2019, 2:43 p.m.