Automator droplet to allow drag and drop URL, download specific files, close Safari window and repeat

Hello


Automator version 2.7

Mac OS 10.12.5 (iMac 27 mid 2011)

Safari 10.1.11


Goal


I have a folder with thousands of URLs (kind - HTML document) that I need to open in Safari. Once open I need to download only specific file types, in my case .pdf, .tar, .dmg and .smi files and save them to a specific folder.


What I have done up to now that works


User uploaded file


1) I select a few of the URLs and open them manually in Safari via double click from the Finder


I then playback and automator script that does the following


2) Get Current Webpage from Safari

3) Get Link URLs from Webpages

4) Filter URLs so that specific filetypes download, .pdf, .tar, .dmg and .smi

5) Download URLs to a folder (the same one each time)

6) Run AppleScript, this actually saves the URL as a webarchive for future reference

7) View Results

8) Pause for 10 seconds

9) Run AppleScript This is where I have a problem, I would like an apple script to close the active tab

10) Loop (start over)


What I would REALLY like to achieve.

Create a droplet so that I can drag some URLs on to, the downloads take place and files are saved to a single folder in the Finder and once complete the Safari tab closes and the next tab goes through downloading the files I need.


Can someone help me? If you need more questions please let me know.


—Alex

iMac, OS X El Capitan (10.11), iMac mid 2011, 3.4Ghz i7 32GB RAM

Posted on Jun 4, 2017 3:54 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator droplet to allow drag and drop URL, download specific files, close Safari window and repeat

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.