| html_links | R Documentation |
Finds the <a> and <area> elements with an href below the given
nodes (and the nodes themselves), in document order, without
duplicates. Duplicate destinations are kept, and so are fragment,
mailto: and tel: links.
html_links(x, absolute = FALSE)
x |
A |
absolute |
If |
A data frame with one row per link and character columns text
(the link's cleaned text, see html_text_clean()), href (the
attribute as written, decoded) and url.
Other extraction:
html_forms(),
html_list(),
html_table(),
html_table_cells(),
html_url()
doc <- html_parse(
"<nav><a href='/'>Home</a> <a href='about.html'>About</a></nav>",
base_url = "https://example.org/site/"
)
html_links(doc)
html_links(doc, absolute = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.