bb_rget | R Documentation |
This function provides similar functionality to the the command-line wget
utility.
bb_rget(
url,
level = 0,
wait = 0,
accept_follow = c("(/|\\.html?)$"),
reject_follow = character(),
accept_download = bb_rget_default_downloads(),
accept_download_extra = character(),
reject_download = character(),
user,
password,
clobber = 1,
no_parent = TRUE,
no_parent_download = no_parent,
no_check_certificate = FALSE,
relative = FALSE,
remote_time = TRUE,
verbose = FALSE,
show_progress = verbose,
debug = FALSE,
dry_run = FALSE,
stop_on_download_error = FALSE,
retries = 0,
force_local_filename,
use_url_directory = TRUE,
no_host = FALSE,
cut_dirs = 0L,
link_css = "a",
link_href = "href",
curl_opts,
target_s3_args,
download_link_rewrite
)
bb_rget_default_downloads()
url |
string: the URL to retrieve |
level |
integer >=0: recursively download to this maximum depth level. Specify 0 for no recursion |
wait |
numeric >=0: wait this number of seconds between successive retrievals. This option may help with servers that block users making too many requests in a short period of time |
accept_follow |
character: character vector with one or more entries. Each entry specifies a regular expression that is applied to the complete URL. URLs matching all entries will be followed during the spidering process. Note that the first URL (provided via the |
reject_follow |
character: as for |
accept_download |
character: character vector with one or more entries. Each entry specifies a regular expression that is applied to the complete URL. URLs that match all entries will be accepted for download. By default the |
accept_download_extra |
character: character vector with one or more entries. If provided, URLs will be accepted for download if they match all entries in |
reject_download |
character: as for |
user |
string: username used to authenticate to the remote server |
password |
string: password used to authenticate to the remote server |
clobber |
numeric: 0=do not overwrite existing files, 1=overwrite if the remote file is newer than the local copy, 2=always overwrite existing files |
no_parent |
logical: if |
no_parent_download |
logical: similar to |
no_check_certificate |
logical: if |
relative |
logical: if |
remote_time |
logical: if |
verbose |
logical: print trace output? |
show_progress |
logical: if |
debug |
logical: if |
dry_run |
logical: if |
stop_on_download_error |
logical: if |
retries |
integer: number of times to retry a request if it fails with a transient error (similar to curl, a transient error means a timeout, an FTP 4xx response code, or an HTTP 5xx response code |
force_local_filename |
character: if provided, then each |
use_url_directory |
logical: if |
no_host |
logical: if |
cut_dirs |
integer: if |
link_css |
string: css selector that identifies links (passed as the |
link_href |
string: the attribute of a link that gives the destination (i.e. the URL to follow) |
curl_opts |
named list: options to use with |
target_s3_args |
list: named list or arguments to provide to |
download_link_rewrite |
function: if supplied, this function will be applied to each download link after it is scraped from the source page and expanded to an absolute URL but before it is checked against
and it should return a copy of |
a list with components 'ok' (TRUE/FALSE), 'files', and 'message' (error or other messages)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.