extract_meta_data {mediacloudr}R Documentation

Extract meta data

Description

extract_meta_data extracts native, open graph and twitter meta data from html documents. The meta data include url, title, description and image. The html document is parsed within the function

Usage

extract_meta_data(html_doc)

Arguments

html_doc

Character string including the html document.

Value

List with three sublists for native, open graph and twitter.

Examples

## Not run: 
 library(httr)
 url <- "https://bits.blogs.nytimes.com/2013/04/07/the-potential-and-the-risks-of-data-science"
 response <- GET(url)
 html_document <- content(response, type = "text", encoding = "UTF-8")
 meta_data <- extract_meta_data(html_doc = html_document)

## End(Not run)


[Package mediacloudr version 0.1.0 Index]