Hey! I’ve been in your shoes before. AppleScript HTML DOM download images is a bit of a headache, but it’s possible. Here’s a quick script to get you started:
```applescript
tell application "Safari"
set imgURLs to do JavaScript "Array.from(document.querySelectorAll('img')).map(img => img.src);" in document 1
end tell
```
Then, use `do shell script` to download the images. If you’re stuck, this guide might help: [link].
Also, if you’re open to alternatives, `Puppeteer` is way easier for this kind of thing.
```applescript
tell application "Safari"
set imgURLs to do JavaScript "Array.from(document.querySelectorAll('img')).map(img => img.src);" in document 1
end tell
```
Then, use `do shell script` to download the images. If you’re stuck, this guide might help: [link].
Also, if you’re open to alternatives, `Puppeteer` is way easier for this kind of thing.
