2

I'm trying to download a website so it can be browsed offline, so I want the html, images, css, javascript, etc.

The problem is that the images are not all hosted on the same domain as the website, likewise with the css and javascript. Some of the images come from imgur, others from other filesharing sites. In short, there are many many domains that have resources that are used by this site.

How can I download the html from the single domain, but get the resources used by that html from any domain?

1

You should use a set of arguments for host spanning:

Mainly:

  • -H to traverse to other hosts than specified
  • -D to specify domains to be included
  • --exclude-domains to specify domains to be excluded

For example:

wget -rH --exclude-domains flickr.com myownsite.com
  • I thought about this, but there are so many domains that the resources are hosted on, I couldn't possible include or exclude them all. – user2370460 Feb 15 '16 at 18:18
  • So what exactly are you asking for? – techraf Feb 15 '16 at 22:32
  • 1
    I think they wanted the host spanning to only apply to page prerequisites, not to the main page to page traversal. – ahcox Apr 16 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.