extract_links: Extract Links from HTML

View source: R/extract_links.R

extract_linksR Documentation

Extract Links from HTML

Description

Extracts hyperlinks from one or more HTML documents by reading a HTML markup, selecting all <a> nodes and returning their 'href' attributes as a vector. Robust implementation that returns 'NA' on error. Vectorized.

Usage

extract_links(x, NA.omit = FALSE)

Arguments

x

Character. A vector of filenames or URLs.

NA.omit

Logical. Whether to return results with or without NAs included. Defaults to FALSE.

Value

A vector of hyperlinks (for a single HTML document) or a named list of vectors (for a vector of document names).


SeanFobbe/databuilder documentation built on July 20, 2022, 4:50 a.m.