icloud_photos_downloader: Authentication failed because China mainland account migated to icloud.com.cn instead of icloud.com(with solution)
Hi,
Suddenly, this great tool stop working since 18/Nov, I didn’t touch anything on the server running it. I didn’t change my icloud password as well!
I installed it in Ubuntu, with Python 3.8.10. Anyone can help me? I really love this tool.
Error message are:
2021-11-20 15:02:31 DEBUG Authenticating...
Traceback (most recent call last):
File "/usr/local/bin/icloudpd", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/icloudpd/base.py", line 255, in main
icloud = authenticate(
File "/usr/local/lib/python3.8/dist-packages/icloudpd/authentication.py", line 29, in authenticate
icloud = pyicloud_ipd.PyiCloudService(
File "/usr/local/lib/python3.8/dist-packages/pyicloud_ipd/base.py", line 193, in __init__
self.authenticate()
File "/usr/local/lib/python3.8/dist-packages/pyicloud_ipd/base.py", line 219, in authenticate
self.params.update({'dsid': resp['dsInfo']['dsid']})
KeyError: 'dsInfo'
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 7
- Comments: 47 (1 by maintainers)
update the file : site-packages/pyicloud_ipd/base.py
find the keywords icloud.com, there are only 2 lines, replace it with the icloud.com.cn. it should get back
–env icloud_china=True \
中国大陆 icloud 用户可以用这个
我在 tag 为 1.7.2 原镜像基础上做了修改:
把
base.py
改为:
然后使用以下 dockerfile 构建出新的镜像:
新镜像默认使用中国的域名,也可以通过传入环境变量禁止使用中国域名,如下:
Haha, great job!!
Actually, I just found those lines almost at the same time! now it’s working again!!
你好,从19号早上6点多的计划任务开始也出现了相同的问题,我也有两个账号,和你一模一样,但我两个账号都是中国的,都设置6小时更新一次。目前A账号的计划任务完全正常可以正常同步,B账号就报和你一样的错误(AB两个账号当时都是同一天设置好的计划任务),可以判断应该就是账号的问题,或许正如你所说被限制了。我现在将B账号的计划任务停了,希望过几天能解除限制。如果找到解决办法大家可以同步一下,谢谢。