Learn R Programming

readrba (version 0.1.12)

safely_read_html: 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, ...)

Value

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

Arguments

url

url to read with xml2::read_html()

...

arguments passed to xml2::read_html()