Yo, I feel you! AppleScript HTML DOM download images can be tricky at first. Honestly, I’d recommend using a tool like `Puppeteer` or `BeautifulSoup` if you’re open to alternatives. They’re way more flexible for scraping images.
But if you’re set on AppleScript, try this:
```applescript
tell application "Safari"
set imgURLs to do JavaScript "Array.from(document.images).map(img => img.src);" in document 1
end tell
```
This stores all image URLs in a list. You can loop through and download them using `curl` or something.
But if you’re set on AppleScript, try this:
```applescript
tell application "Safari"
set imgURLs to do JavaScript "Array.from(document.images).map(img => img.src);" in document 1
end tell
```
This stores all image URLs in a list. You can loop through and download them using `curl` or something.
