Read Memory Beta article content and metadata.

mb_article(
  url,
  content_format = c("xml", "character"),
  content_nodes = c("h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "ul"),
  browse = FALSE
)

Arguments

url

character, article URL. Expects package-style short URL. See examples.

content_format

character, the format of the article main text, "xml" or "character".

content_nodes

character, which top-level nodes in the article main text to retain.

browse

logical, also open url in browser.

Value

a nested data frame

Details

Article content is returned in a nested, tidy data frame.

Examples

mb_article("Azetbur")
#> # A tibble: 1 × 4
#>   title                       content    metadata         categories       
#>   <chr>                       <list>     <list>           <list>           
#> 1 Azetbur, daughter of Gorkon <xml_ndst> <tibble [1 × 8]> <tibble [10 × 2]>