Function accepts three types of input: a Google News search query, a direct list of news URLs, or an RSS feed URL. Depending on the input type, it either performs a Google News search and processes the resulting RSS feeds, directly scrapes the provided URLs, or processes an RSS feed to extract URLs for scraping.

web_scrape_urls(x, input = "search", cores = 3)

Arguments

x

A character string for the search query or RSS feed URL, or a character vector of URLs.

input

A character string specifying the input type: 'search', 'rss', or 'urls'.

cores

The number of cores to use for parallel processing.

Value

A data frame containing scraped news data.

Examples

if (FALSE) { # \dontrun{
url <- 'https://www.nytimes.com/2024/03/25/nyregion/trump-bond-reduced.html'
article_tif <- web_scrape_urls(x = url, input = 'urls', cores = 1)
} # }