rget: download a static website

Description Usage Arguments Details motivation

Description

download a static website

Usage

1
rget(website, dest_dir, force = FALSE, verbose = TRUE)

Arguments

website

string. url of the website to be cloned, it should be the domain name (sub directory not supported yet). you can't append ?...#..., for example, 'www.foobar.com?haha#xixi' is forbidden,

dest_dir

string. No tailling '/'

force

download_file()

verbose

download_file()

Details

we assume:

  1. static http(s) website, no query (?foo=bar), no account authentication

  2. HTML file is always linked by <a> tag

  3. HTML file name all end with '.html', and default file name is 'index.html'

rget('www.cookbook-r.com', 'data-raw'); rget('www.cookbook-r.com', '~/Git/mirrors')

motivation

as_url2file()


dongzhuoer/rget documentation built on July 29, 2020, 1:45 p.m.