Skip to content

Instantly share code, notes, and snippets.

@alexyorke
Created December 17, 2020 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexyorke/8e97660e5dbcdc72e3ba9f8703eea4c4 to your computer and use it in GitHub Desktop.
Save alexyorke/8e97660e5dbcdc72e3ba9f8703eea4c4 to your computer and use it in GitHub Desktop.
wget --no-directories --mirror --spider https://example.com/website-to-be-archived/ 2>&1 | grep -P -o -e '(?<=^--....-..-.. ..:..:..-- )(.*)' | xargs -I{} -P 2 curl 'https://web.archive.org/save/{}' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://web.archive.org' -H 'Connection: keep-alive' -H 'Referer: https://web.archive.org/save/' -H 'Upgrade-Insecure-Requests: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'TE: Trailers' --data-raw 'url={}' >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment