extract_links: Extract the links from text of a web page

Description Usage Arguments Details Value Author(s) See Also

View source: R/parsepage.r

Description

Extract the links from text of a web page

Usage

1
2
3
  extract_links(body, linktype = "href", regex = NULL,
    fixed = FALSE, rooturl = attr(body, "url"),
    absolute = TRUE, USE.NAMES = FALSE)

Arguments

body

Raw text of web page

linktype

class of link to find (e.g. href,src)

regex

Regular expression to filter links

fixed

Whether regular expression is fixed

rooturl

Base url for expansion of relative links

absolute

Whether to convert relative urls to absolute

USE.NAMES

Return relative links as names when absolute = FALSE

Details

The baseurl is normally just the original url (although a different url is sometime explicitly specified in the html body).

Value

character verctor of urls

Author(s)

jefferis

See Also

grep,getHTMLLinks


jefferis/gscraper documentation built on Oct. 25, 2020, 12:08 a.m.