: 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
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?
More posts by @Angie530
3 Comments
Sorted by latest first Latest Oldest Best
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)
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.