Description Usage Arguments Value Examples
View source: R/paragraphs_scrap.R
This function is used to scrape text paragraphs from a website.
1 2 3 4 5 6 7 | paragraphs_scrap(
link,
contain = NULL,
case_sensitive = FALSE,
collapse = FALSE,
askRobot = FALSE
)
|
link |
the link of the web page to scrape |
contain |
filter the paragraphs according to the character string provided. |
case_sensitive |
logical. Should the contain argument be case sensitive ? defaults to FALSE |
collapse |
if TRUE the paragraphs will be collapsed into one element and the contain argument ignored. |
askRobot |
logical. Should the function ask the robots.txt if we're allowed or not to scrap the web page ? Default is FALSE. |
a character vector.
1 2 3 4 5 | # Extracting the paragraphs displayed on the health page of the New York Times
link <- "https://www.nytimes.com/section/health"
paragraphs_scrap(link)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.