Skip to content

Instantly share code, notes, and snippets.


Brooke Schreier Ganz Asparagirl

  • Mill Valley, California
View GitHub Profile
Asparagirl / gist:6202872
Last active Mar 28, 2022
Want to help Archive Team do a "panic grab" of a website, so that you can later upload it to the Internet Archive for inclusion in its WayBack Machine? Here's the code!
View gist:6202872

Want to grab a copy of your favorite website, using wget in the command line, and saving it in WARC format? Then this is the gist for you. Read on!

First, copy the following lines into a textfile, and edit them as needed. Then paste them into your command line and hit enter:

export USER_AGENT="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27"
export FILES_AND_PATHS_TO_EXCLUDE="/path/to/ignore"
export WARC_NAME=""