I have a some simple html pages Test.html, test2.html, test3.html. This pages have some links to images:
<img src="http://site.org/path/to/file/6c7f2.jpeg"/>
How download all images from this pages automatically, put near the html files and change links in html pages to local images?
Thanks!
Try the command
$ wget -F -i <html_file>This will download every link contained in your
<html_file>and put them in the current directory. I recommend you to read the manual of wget ($ man wget) under the OPTIONS section from where i extracted the folowing:and the option:
Also, I recommend you to read the
--output-fileoption from the man page.This will only handle the download stuff… to make automatic changes on your html file i think you need other tools that shellscripting either does not provide or, if it does, are very complicated to use. I recommend doing a script in python that uses the mentioned command to the downloading stuff, and some python specialized library to process (parse) the file, and make the convenient changes.
Good luck!!!