get_url_domain()
retrieves the Web domain name from a URL, including
URLs shortened with services such as bit.ly and t.co
Arguments
- x
A list or vector of hyperlinks, whether shortened or expanded
- wait
How long (in seconds) to wait on the
longurl::expand_urls()
function to retrieve the full, expanded URL from a shortened URL (e.g., a bit.ly). Thelongurl
default is 2 seconds, but we have found that this misses a number of valid URLs. Here, we have made the defaultwait = 10
seconds, but the user can adjust this as they like.
See also
Read the documentation for longurl::expand_urls()
and
urltools::domain()
.