Download all linked files at once from a website in Safari
I have found this software for my own use just now and then I remembered your question. That's what I have found, perhaps that can help you :
Folx
Folx is a free download manager for Mac OS X with a true Mac-style interface. It offers convenient downloads managing, flexible settings, etc. Folx has a unique system of sorting and keeping the downloaded content.
iGetter
Site Explorer allows exploration of the entire web or FTP sites, so you can easily find and download files you're interested in. To explore a HTTP, HTTPS or FTP site select the Site Explorer group item and choose the contextual menu function "Enter Site URL" to set a site URL. When you reach the file that you want to download double click on it or choose the contextual menu function "Add to queue" and it will appear in the queue for download. If you want to cancel the processing just push the "Pause" button on the Toolbar. Site Explorer analyzes HTML pages for all available links even looking in the JavaScript functions, so it will show a complete list of web page contents.
And I've found the following, when I was searching about your question:
How can I download all MP3 files from a web site?
SiteSucker is a great (free) application! It will allow you to download folders from a site. So, just enter in your URL and click "Download"
SiteSucker is a Macintosh application that automatically downloads Web sites from the Internet. It does this by asynchronously copying the site's Web pages, images, backgrounds, movies, and other files to your local hard drive, duplicating the site's directory structure. Just enter a URL (Uniform Resource Locator), press return, and SiteSucker can download an entire Web site.
Use the command line tool wget
for this. If you don't have wget
installed, install it using the instructions here.
To download all linked files from a url, run a command like
wget --recursive --no-clobber --no-parent www.example.com/page/
The --recursive
option tells wget
to follow links. The --no-clobber
means only download each linked file once, and --no-parent
prevents wget
from following links that lead up to a parent directory--generally not what you want.
More information is available in the docs.
Here is another alternative, similar to that one of Foxl.
Update: August 2019
Both browser plugins have been discontinued and their functionally is now part of Download Shuttle Pro (paid version). The plugins can still be downloaded in the official support page. For newer versions of Safari, one might have to find ways to go around the imposed "unsafe extension" limitation.
Original answer below
Download Shuttle is a simple and lightweight download manager for macOS. It works as a stand-alone or as a browser extension. It comes with plugins for Safari and Chrome.
Download Shuttle is a blisteringly fast download accelerator and manager, and it’s free! All downloads made via Download Shuttle are multi-segmented, i.e., each file is split into many smaller parts that are simultaneously being downloaded. This ensures that the speeds you experience are a lot faster as your bandwidth is maximized.
It is free. I find it more easy to use than Foxl. When compared to Foxl's free version, it also has the advantage of not having ads or popups that ask you to buy the full version.
It is being updated (apps and extensions) as of 2017.
Tested on macOS 10.12.5 and Safari 10.1.1.
Chrome/Firefox Browser answer. Chrome/Firefox can use the HTML5 download attribute.
As Far as I know Safari does not support it yet.
Since you are building the web pages. You can add the download attribute to the links and also give them a class name that will help you find them.
You then use a button that runs a javascript function that will simulate clicking the links which use download attribute to force the files to download instead of opening.
Example.
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script>
function downloadURLS() {
var links = document.getElementsByClassName("downloadLnk");
for(var i=0; i<links.length; i++) {
links[i].click();
}
}
</script>
</head>
<body>
<p>
<!-- add the download attribute, and add the class name downloadLnk -->
<!--The download attribute will work in Chrome, but as of yet not Safari-->
<a class="downloadLnk" href="subdir/1.jpeg" download > image link</a>
</a>
</p>
<p>
<a class="downloadLnk" href="subdir/2.jpeg" download > image link</a>
</a>
</p>
<p>
<a class="downloadLnk" href="subdir/3.jpeg" download > image link</a>
</a>
</p>
<div>
<button onclick="downloadURLS()">download all</button>
</div>
</body>
</html>
Also not that the images are in a sub directory.
Working Example page