wget -mpEk "url"
-m (mirror) instead of
-r is preferred as it intuitively
downloads assets and you don't have to specify recursion depth, using
mirror generally determines the correct depth to return a functioning
-p -E -k ensure that you're not downloading entire
pages that might be linked to (e.g. Link to a Twitter profile results
in you downloading Twitter code) while including all pre-requisite
structure is preserved as well (instead of one big .html file with
embedded scripts/stylesheet that can sometimes be the output.
It's fast, I have never had to limit anything to get it to work and
the resulting directory looks better than simply using the
arg and provides better insight into how the site was put together,
especially if you're reverse-engineering for educational purposes.
Note that if you're downloading a web-app or a site with lots of
the TypeScript that was used initially, only what is compiled and sent
to the browser. Take this into consideration if the site is very
or use httrack
httrack --ext-depth=1 "url"