| html_meta | R Documentation |
One row per <meta> element below the given nodes (and the nodes
themselves), in document order. Duplicates are kept, so OpenGraph
(og:* in property), Twitter cards and Dublin Core (name) come out
as rows to filter.
html_meta(x)
x |
A |
A data frame with character columns name, property,
http_equiv, charset and content, each the attribute as written
(decoded) or NA when absent. name, property and http_equiv keep
their case; compare with tolower().
Other metadata:
html_json_ld(),
html_microdata(),
html_title()
doc <- html_parse(paste0(
"<meta charset='utf-8'>",
"<meta name='description' content='A page.'>",
"<meta property='og:title' content='Title'>",
"<meta property='og:image' content='a.png'>",
"<meta property='og:image' content='b.png'>"
))
meta <- html_meta(doc)
meta
meta$content[meta$property %in% "og:image"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.