getTLD: Retrieve a current list of the top level domains

Description Usage Arguments Examples

View source: R/tldextract.R

Description

This function will reach out to https://publicsuffix.org/list/effective_tld_names.dat, retrieve the contents and create a simple vector of all the top level domains (removing comments and blanks lines from the file).

If there is no network connectivity, a cached version of the data ("tldnames") is included with this package and can be loaded with data("tldnames") after loading this package.

Usage

1
getTLD(url = "https://publicsuffix.org/list/effective_tld_names.dat")

Arguments

url

URL of the location for the tld name authority. Set to point to publicsuffix.org by default; while you can change this, much of getTLD's internal parsing may be specific to publicsuffix.org's format, and so other URLs may actively break or produce oddly formated results

Examples

1
2
3
4
## Not run: 
tldnames <- getTLD()

## End(Not run)

jayjacobs/tldextract documentation built on Jan. 7, 2020, 12:25 a.m.