get_article: Scrape text from a single article hosted on Scielo

Description Usage Arguments Value Note Examples

View source: R/get_article.R

Description

get_article() scrapes the full text from an article hosted on Scielo. In bilingual journals, the text retrieved is in the journal's main language used for publication (most of the time, it is English).

Usage

1
get_article(x, output_text = TRUE)

Arguments

x

a character vector with the link or id of the article hosted on Scielo to be scrapped.

output_text

a logical indicating whether get_article() should return a character vector or a tibble (defaults to TRUE).

Value

When the argument output_text is TRUE, the function returns a character vector with the requested article's content. When output_text is FALSE, the function returns a tibble with the following variables:

Note

Sometimes, the Scielo website is offline for maintaince, in which cases this function will not work (i.e., users will get HTML status different from the usual 200 OK).

Examples

1
2
article <- get_article(x = "http://www.scielo.br/scielo.php?
script=sci_arttext&pid=S1981-38212016000200201&lng=en&nrm=iso&tlng=en")

meirelesff/rScielo documentation built on Nov. 18, 2021, 9:57 a.m.