Is there a way to get a public URL for individual iCloud photos?

I understand it's possible, through the Photos app and iCloud, to create a sharing stream of photos. What I am wondering is if it's possible to get a public URL from any given photo in iCloud.

My end goal is to use the URL in a shell script that would replicate CloudApp or Dropbox screenshot sharing, only using iCloud storage. Can't seem to find anything on the web that explains if this is/isn't possible.

Any suggestions are greatly appreciated :)


Solution 1:

There is no way to get the URL from the Photos app that I am aware of. However, you can create a public album (see screenshot) which will then give you an album URL. You could scrape that page for image URLs. Psuedo Xpath to do so: //div[@class="view image-view canvas-image-view"]

(Note that the page is written in such a way that only the photo[s] visible on-screen are present in the HTML code, so your script would need to scroll through the window to scrape all the necessary URLs.)

enter image description here