#参考资料
- https://www.cxyzjd.com/article/weixin_39638014/111376169
- https://github.com/icloud-photos-downloader/icloud_photos_downloader
安装过程
1. 前置准备
-
安装ubuntu容器
-
安装python3
apt-get update && apt-get -y install python3 -
设置时间(方便后续定时任务)
apt-get update && apt-get -y install tzdatatzdata -
安装python3 pip
apt install python3-pip
2. 安装icloudpd
pip3 install icloudpd
icloudpd --directory ./mnt2 \
--username ${myaccount} \
--password ${mypassword} \
--folder-structure {:%Y}
--set-exif-datetime
--auto-delete
失败的原因 -- 需要修改 icloud.com --> icloud.com.cn . 具体见
https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/392
3.设置定时任务
-
Clone the git repo somewhere
git clone https://github.com/icloud-photos-downloader/icloud_photos_downloader.git
cd icloud_photos_downloader -
Copy the example cron script
cp cron_script.sh.example cron_script.sh
结束任务后通过telegram给自己发送消息
https://blog.imfing.com/2020/06/telegram-bot-notify-with-bash/