body_img_urls: Extract all body image URLs

Description Usage Arguments Value Examples

View source: R/body_img_urls.R

Description

Given a valid HTML/XML document, node set or single node, a claracter vector of all <body> <img src> URLs will be returned. If base is not NULL all relative URLs will be converted to absolute URLs.

Usage

1

Arguments

x

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

unique

if TRUE, then only unique URLs will be returned. Default: FALSE.

base

if not NULL, all relative URLs will be converted to absolute URLs. Default: NULL.

Value

character vector of extracted URLs; if no <img> src URLs were discovered charactrer(0) will be returned.

Examples

1
2
x <- rvest::read_html("https://congress.gov/") %>%
body_img_urls(x,unique = TRUE, base = "https://congress.gov/")

hrbrmstr/urldiversity documentation built on May 14, 2019, 4 a.m.