3

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 Answer 1

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
3
  • 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. Commented Feb 15, 2016 at 18:18
  • So what exactly are you asking for?
    – techraf
    Commented Feb 15, 2016 at 22:32
  • 2
    I think they wanted the host spanning to only apply to page prerequisites, not to the main page to page traversal.
    – ahcox
    Commented Apr 16, 2019 at 16:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .