icloudpd is a python utility to download images from icloud. Handy to make backups as I don't want to only rely on icloud to have my images.
Installation:
pip install icloudpd==1.17.0
A sample script that I use:
#!/usr/bin/bash
icloudpd --directory /home/username/images/icloud \
--recent 3000 \
--username email@example.com \
--password password \
This script will get the most recent 3000 images. You can skip that flag to do a full sync.
There may be a prompt to do the 2 factor authentication so you will need your phone.