extract_domain: Extract the domain from the full URL

Description Usage Arguments Value Examples

Description

Extracts the domain (usually https://geizhals.at or https://geizhals.at, but may also be the path to a local file for testing or debugging.)

Usage

1
extract_domain(url_str)

Arguments

url_str

URL of some (geizhals) page. Character vector of length 1.

Value

The domain up to (but not including) the last "/" character, as a character vector of length 1.

Examples

1
2
3
4
5
6
7
extract_domain("https://geizhals.eu/?cat=monlcd19wide")
extract_domain(paste0("https://geizhals.at/?cat=hwaeschtr&",
  "xf=1027_W%E4rmepumpentrockner%7E1296_10%7E1747_8%7E7641_40%7E7653_9"))
extract_domain(paste0("https://geizhals.at/lg-electronics-x-",
  "screen-k500n-weiss-a1419167.html?hloc=at"))
extract_domain(system.file("extdata", "gh-lst-trockn-01.html",
  package = "rgeizhals"))

ingonader/rgeizhals documentation built on May 29, 2019, 3:05 a.m.