Skip to contents

Read Website Metadata

Usage

read_metadata(url, output = c("list", "data.frame"), force = FALSE)

Arguments

url

charcter url of website, or path to html document

output

character defining desired output type. Must be one of:

  • (list)

  • data.frame

force

logical force metadata retrieval where site does not authorise scraping. This option should only be used if you are the owner of the site.

Value

list or data.frame

Examples

read_metadata('https://www.w3.org/')
#> $viewport
#> [1] "width=device-width"
#> 
#> $description
#> [1] "The World Wide Web Consortium (W3C) is an international community where Member organizations, a full-time staff, and the public work together to develop Web standards."
#> 
#> $`og:title`
#> [1] "World Wide Web Consortium (W3C)"
#>