-
-
Save brovish/d2595264d7bc2b0a384deee5e70c62dd to your computer and use it in GitHub Desktop.
Download an entire website with wget, along with assets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. | |
| --restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
| --domains yoursite.com \ # Do not follow links outside this domain. | |
| --no-parent \ # Don't follow links outside the directory you pass in. | |
| yoursite.com/whatever/path # The URL to download |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| start "" /d F:\onedrive\books_sql wget --mirror -p --html-extension --convert-links -e robots=off -P . https://sqlserverperformace.blogspot.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| start "" /d F:\onedrive\books_sql\ wget --wait=2 --level=inf --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off http://www.example.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment