wget is a great tool to make a quick snapshot of a small site. As far as I know (I really hope I just couldn't find it in wget --help
), wget can follow well-known HTML URL attributes only, like <a href=...
, <img src=...
and so on. However, sometimes a particular site might use non-standard attributes that represent real URLs that do not look like URLs for wget. Let' say, if a site has a "static" gallery with zoomed images, a particular image page might have something like this:
<div zoomed_img="/gallery/image.jpg">
<img src="/gallery/image_small.jpg"/>
</div>
Thus, wget ignores the zoomed_img
attribute with /gallery/image.jpg
. My wget command is:
wget --recursive \
--domains domain \
--no-parent \
--page-requisites \
--no-clobber \
--html-extension \
--convert-links \
http://domain/gallery
Is it possible to make wget follow custom URL HTML attributes?
div
tag explicitly as--follow-tags=a,div,img
resulted in the same effect.