"equivalent" shell scripts - one works, one doesn't

Out of interest, why curl? What's that getting you that KM's "Get a URL" action doesn't?

Example for a single image file:

...and easy to change to a "For each" loop based on your JavaScript results.