Skip to content

Instantly share code, notes, and snippets.

@AlexNDRmac
Last active August 25, 2019 10:36
Show Gist options
  • Save AlexNDRmac/236cd741718ccd0b11acc1d5436161a7 to your computer and use it in GitHub Desktop.
Save AlexNDRmac/236cd741718ccd0b11acc1d5436161a7 to your computer and use it in GitHub Desktop.
Save entire web page for locally browsing with wget
$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --domains gist.github.com \
     --no-parent \
         https://gist.github.com/AlexNDRmac/6cc76125a0ba96a7d51d3e5a26b9ff3b/

This command downloads the Web page https://gist.github.com/AlexNDRmac/6cc76125a0ba96a7d51d3e5a26b9ff3b/.

The options are:

 --recursive: download the entire Web site.
 --domains gist.github.com: don't follow links outside gist.github.com.
 --no-parent: don't follow links outside the directory AlexNDRmac/6cc76125a0ba96a7d51d3e5a26b9ff3b/.
 --page-requisites: get all the elements that compose the page (images, CSS and so on).
 --html-extension: save files with the .html extension.
 --convert-links: convert links so that they work locally, off-line.
 --no-clobber: don't overwrite any existing files (used in case the download is interrupted and resumed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment