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

16 Replies, 988 Views

Hey everyone,

So, I’ve been trying to figure out how to use AppleScript HTML DOM download images from a webpage, but I’m kinda stuck. Like, I know AppleScript can interact with Safari, and I’ve seen some examples of grabbing text, but images? Not so much.

I’m thinking maybe I can use JavaScript via AppleScript to access the DOM and pull image URLs, then download them. But idk, I’m not super confident with the syntax.

Has anyone tried this before? Like, using AppleScript HTML DOM download images? Any tips or code snippets would be *super* helpful.

Also, if there’s a better way to do this, lmk! I’m open to suggestions.

Thanks in advance, y’all!

(btw, sorry if this is a noob question, still learning the ropes here 😅)

Messages In This Thread
How can I use AppleScript and HTML DOM to download images from a webpage? - by - 28-10-2024, 09:23 AM



Users browsing this thread: 1 Guest(s)