Reputation: 2974
I'm rebuilding a website for fun (but also making it better) and I want to batch download the images that are on the site. I have found an XML file which contains all the links to the images (or at least some of them). Here's the file.
Is there a way to download all the images in this XML with a Windows program or a script of some sort? Thank you very much.
Upvotes: 0
Views: 7787
Reputation: 3020
You need to do three things:
Additionally, you could install other programming languages such as python or ruby, and use an http library that they have. The setup is longer, but the syntax is likely easier once setup in such languages.
Update: If you use search and replace on the xml document to create an html page containing a list of links like so:
<body>
<a href="http://gkvrozenburg-voorne.nl/images/45.jpg" download>link</a>
<a href="http://gkvrozenburg-voorne.nl/images/IMG_3026.jpg" download>link</a>
<a href="http://gkvrozenburg-voorne.nl/images/IMG_3037.jpg" download>link</a>
<a href="http://gkvrozenburg-voorne.nl/images/IMG_3039.jpg" download>link</a>
<a href="http://gkvrozenburg-voorne.nl/images/IMG_3047.jpg" download>link</a>
</body>
Then you can open it up in a browser, start the browsers javascript console and type the following:
var anchors = document.getElementsByTagName('a')
for (var i = 0; i < anchors.length; i++) {
anchors[i].click()
}
This will download all of the images.
Upvotes: 1