safely_read_html: 'read_html()' safely.

View source: R/safely_read_html.R

safely_read_htmlR Documentation

read_html() safely.

Description

The purpose of this function is to specify a user agent for scraping, to try a second time if a scrape attempt fails, and to return a useful error if the page cannot be scraped.

Usage

safely_read_html(url, ...)

Arguments

url

url to read with xml2::read_html()

...

arguments passed to xml2::read_html()

Value

If the URL is read without error, an XML document (see ?xml2::read_html).


readrba documentation built on June 17, 2022, 9:07 a.m.