在群晖NAS上使用icloudpd下载icloud上面的照片

2022/02/26 00:10 上午 posted in  工具

#参考资料

安装过程

1. 前置准备

  1. 安装ubuntu容器

  2. 安装python3
    apt-get update && apt-get -y install python3

  3. 设置时间(方便后续定时任务)
    apt-get update && apt-get -y install tzdatatzdata

  4. 安装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.设置定时任务

  1. Clone the git repo somewhere
    git clone https://github.com/icloud-photos-downloader/icloud_photos_downloader.git
    cd icloud_photos_downloader

  2. 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/