extract_meta_data: Extract meta data

Description Usage Arguments Value Examples

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

1

Arguments

html_doc

Character string including the html document.

Value

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

Examples

1
2
3
4
5
6
7
8
## 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)

mediacloudr documentation built on July 24, 2019, 9:03 a.m.