Mobile app version of vmapp.org
Login or Join
Angie530

: Wget - download external images I'm using wget -A to download images from a page. This works fine, when images are hosted on the same domain as the page. But this won't download images hotlinked

@Angie530

Posted in: #Download #Images

I'm using wget -A to download images from a page.
This works fine, when images are hosted on the same domain as the page.
But this won't download images hotlinked from other pages (e.g. imageshack)

How can I download the external images as well using wget or similar tool?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Angie530

3 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

You need the -H (resp. --span-hosts) parameter. It enables downloading of linked resources that are hosted at different hosts/domains.

In addition you may block specific domains with --exclude-domains (Example: --exclude-domains=example.com,example.org)

10% popularity Vote Up Vote Down


 

@Harper822

Some adminsys (me included) block the wget user-agent on some files to avoid hotlinking (for example).

There are also other tools like wget: cURL, httpie, etc.. but they also can be blocked by their user-agent.

So it might not be a problem from you, but from domain you are querying.

10% popularity Vote Up Vote Down


 

@Pierce454

You have to specify the domain you allow wget to follow using -D [domain list] or --domains=[domain list] (coma separated)

Note: I don't know if it handles wildcards.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme