How can I use AppleScript and HTML DOM to download images from a webpage?

16 Replies, 1013 Views

Hey! I’ve been down this rabbit hole too. AppleScript HTML DOM download images is doable, but it’s a bit clunky. Here’s what worked for me:

1. Use JavaScript to extract image URLs.
2. Pass those URLs to AppleScript.
3. Use `curl` or `wget` in a shell script to download them.

If you’re stuck on the JS part, this site has a great tutorial: [link]. It’s not AppleScript-specific, but the concepts transfer.

Also, if you’re dealing with dynamic content, make sure the page is fully loaded before running your script.

Messages In This Thread



Users browsing this thread: 1 Guest(s)