{"id":26719938,"url":"https://github.com/haoke98/iclouddesktop","last_synced_at":"2025-04-14T04:35:22.749Z","repository":{"id":136607239,"uuid":"573773998","full_name":"Haoke98/iCloudDesktop","owner":"Haoke98","description":"icloud python 客户端, 可以操作相册, 云盘, Notes, 联系簿, 设备位置等等, 只要是在iCloud网页端上可进行的操作都能进行","archived":false,"fork":false,"pushed_at":"2024-09-13T03:23:21.000Z","size":16440,"stargazers_count":42,"open_issues_count":4,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T18:48:39.497Z","etag":null,"topics":["backup","icloud","icloud-drive","icloud-photos","pyhthon","pyicloud","python3","sdk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Haoke98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-03T11:46:57.000Z","updated_at":"2025-01-15T09:32:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"75098816-5a0e-4716-ba9d-e3a141c0d816","html_url":"https://github.com/Haoke98/iCloudDesktop","commit_stats":null,"previous_names":["haoke98/iclouddesktop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoke98%2FiCloudDesktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoke98%2FiCloudDesktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoke98%2FiCloudDesktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haoke98%2FiCloudDesktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haoke98","download_url":"https://codeload.github.com/Haoke98/iCloudDesktop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248823899,"owners_count":21167327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","icloud","icloud-drive","icloud-photos","pyhthon","pyicloud","python3","sdk"],"created_at":"2025-03-27T18:30:10.839Z","updated_at":"2025-04-14T04:35:22.705Z","avatar_url":"https://github.com/Haoke98.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ccite\u003eiCloud Desktop\u003c/cite\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"300\" src=\"assets/41166dada6559cb93c7a4ff0ea681e52.png\"\u003e\n\u003c/p\u003e\n\nEnglish | [简体中文](README.zh.md)\n\n\n\n\n| \u003cimg src=\"assets/sync.gif\" alt=\"Image 1\"  height=\"400\"/\u003e | \u003cimg src=\"assets/login_page.png\" alt=\"Image 1\"  height=\"400\"/\u003e |\n|:--------------------------------------------------------:|:--------------------------------------------------------------:|\n|         *Preview of home page and interactions*          |                    *Preview of login page*                     |\n\n\n### 相关项目\n\n* 🚀 [iCloudSDK](https://github.com/Haoke98/iCloudSDK) 是一个基于Python的icloud通用API调用SDK依赖库.任何一个python项目导入便可使用.\n* ☘️  [iCloudDjango](https://github.com/Haoke98/iCloudDjango) 是一个DjangoApp, 在任何一个Django项目中导入便可使用.\n\n## Usage\n\n```shell\nUsage: icloud.py [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  -u, --username \u003cusername\u003e  Your iCloud username or email address  [required]\n  -p, --password \u003cpassword\u003e  Your iCloud password (default: use PyiCloud\n                             keyring or prompt for password)  [required]\n\n  --china-account            Specify the \"HOME_ENDPOINT\" and \"SETUP_ENDPOINT\"\n                             for the \"China Mainland Accounts\".\n\n  --version                  Show the version and exit.\n  --help                     Show this message and exit.\n\nCommands:\n  device          Device and Location, Find device Location, Get device...\n  photo-download  Manage Photos on your icloud.\n  test            Do some experimental tes.\n```\n\n## \u003cimg width=\"50\" src=\"assets/1c11f0fa22d4e93f8dc179b8ff84791d.png\"\u003e Photos Download （2FA）\n\n```shell\nUsage: icloud.py photo-download \u003coptions\u003e\n\nOptions:\n  -d, --directory \u003cdirectory\u003e    Local directory that should be used for\n                                 download\n\n  --recent INTEGER RANGE         Number of recent photos to download (default:\n                                 download all photos)\n\n  --auto-delete                  Scans the \"Recently Deleted\" folder and\n                                 deletes any files found in there. (If you\n                                 restore the photo in iCloud, it will be\n                                 downloaded again.)\n\n  --modify-olds                  Modify the \"Created Time\" of the old files\n                                 that already been in the folder.\n\n  --workers INTEGER RANGE        Number of the thread to download\n                                 photo.(Default is 3)\n\n  --transfer-album \u003calbum_name\u003e  Determine the album that will be downloaded.\n  --help                         Show this message and exit.\n```\n\nExample 1\n\n```shell\nicloud -d /external/SADAM/icloud/photos/ --recent 500\n```\n\nExample 2\n\n```shell\nicloud -u \u003cusername\u003e -p \u003cpassword\u003e -d /external/SADAM/icloud/photos/ --recent 500\n```\n\nExample 3\n\n```shell\nicloud -u \u003cusername\u003e -p \u003cpassword\u003e\n--china-account\nphoto-download\n-d\n/Volumes/share/SADAM/icloud/photos\n--transfer-album\nHidden\n--modify-olds\n--auto-delete\n--workers\n1\n```\n\n### Automatically start every half hour through crontab\n\n```shell\n*/30 * * * * /\u003cpython absolute path\u003e/python3.9 /\u003cproject absolute path\u003e/icloud.py -u \u003cicloud account\u003e -p \u003cpassword\u003e --china-account photo-download -d /external /SADAM/icloud/photos/ --transfer-album Transfer --auto-delete \u003e\u003e /opt/icloud-killer/logs/last-$(date \"+%Y%m%d%H%M\").log 2\u003e\u00261\n```\n\n## \u003cimg width=\"50\" src=\"assets/dccb81ba3f0f63e9a50c162007f59c4a.png\"\u003e Driver And Files (2FA)\n\n## \u003cimg width=\"50\" src=\"assets/ddc3380f93d44a376c586796bb7c16a7.png\"\u003e Reminds (2FA)\n\n## \u003cimg width=\"50\" src=\"assets/4b1d90456b68a8d4d4b91adb39e60b70.png\"\u003e Contact (2FA)\n\n## \u003cimg width=\"50\" src=\"docs/statics/location.png\"\u003e Device And Location (Weak 2FA: Just send)\n\n* Get device info.\n    * location\n    * Status\n    * Battery level\n    * Device model\n    * Device name\n    * Device ID\n* Remote Control\n    * locking device\n    * Show message\n    * Play sound\n\n```python\napi.iphone.location()\n```\n\n```json\n{\n  'isOld': True,\n  'isInaccurate': False,\n  'positionType': 'Wifi',\n  'secureLocation': None,\n  'secureLocationTs': 0,\n  'altitude': 0.0,\n  'latitude': 43.894873066105184,\n  //纬度\n  'longitude': 87.58595865485619,\n  //经度\n  'horizontalAccuracy': 65.0,\n  //水平精度\n  'verticalAccuracy': 0.0,\n  //垂直精度\n  'timeStamp': 1670048465162,\n  //时间戳\n  'floorLevel': 0,\n  'locationType': '',\n  'locationFinished': True,\n  'locationMode': None\n}\n```\n\n## Development Plan\n* [ ] implements displaying Assets in different orders.\n* [ ] Implement a visual GUI interface that is easy for novice users to operate (no need to set up an environment, just download the Release of the corresponding platform to use it, and the command line function is still retained).\n* [ ] Implement the function of migrating Assets to Immich with one click.\n* [ ] Data migration function\n   * [ ] One-click migration and synchronization removed from iCloud (free up iCloud space)\n   * [ ] Support migration to local hard disk (directory)\n   * [ ] Support migration to third-party platforms:\n     * [ ] [immich-app/immich](https://github.com/immich-app/immich)\n     * [ ] [NextCloud](https://github.com/nextcloud)\n* [ ] setting menu\n   * [ ] View cache\n   * [ ] Clear cache\n   * [ ] proxy settings\n   * [ ] Account Management\n     * You can delete the remembered account password\n\n## Contribution \u0026 Development Specifications\n💡 Friends are very welcome to contribute code to maintain the repo together❕\n* Developers who have made significant contributions can gain the authority to control the development direction of the project\n* Prohibit network programming in the main thread\n\n## Star History\n\n\u003ca href=\"https://star-history.com/#haoke98/icloud-killer\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=haoke98/icloud-killer\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=haoke98/icloud-killer\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=haoke98/icloud-killer\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n## 联系我们\n* QQ邮箱：1903249375@qq.com\n\n\u003cimg width=\"280\" src=\"https://github.com/user-attachments/assets/b8f1d843-1683-4396-b880-35870d07ab51\" /\u003e\n\n\n\n## Problems:\n* Latency problem, there is a short page gap when switching back and forth between the login page and the homepage. (The pack() layout requires a lot of calculations)\n* Missing apple_id field\n    * Detailed error message:\n      ```shell\n      Traceback (most recent call last):\n        File \"test.py\", line 10, in \u003cmodule\u003e\n          api = PyiCloudService(\"***\", \"***\")\n        File \"/usr/local/lib/python3.9/site-packages/pyicloud/base.py\", line 268, in __init__\n          self.authenticate()\n        File \"/usr/local/lib/python3.9/site-packages/pyicloud/base.py\", line 328, in authenticate\n          self._authenticate_with_token()\n        File \"/usr/local/lib/python3.9/site-packages/pyicloud/base.py\", line 350, in _authenticate_with_token\n          raise PyiCloudFailedLoginException(msg, error)\n      pyicloud.exceptions.PyiCloudFailedLoginException: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))\n      ```\n    * solution:\n        * [Apparently `apple_id` and `password` are now required on method:`_authenticate_with_token`](https://github.com/picklepete/pyicloud/issues/349#issuecomment-943885985)\n\n## Related Links\n\n1. [PyiCloud PyPI Home Page](https://pypi.org/project/pyicloud/)\n2. [PyiCloud GitHub Home Page](https://pypi.org/project/pyicloud/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoke98%2Ficlouddesktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaoke98%2Ficlouddesktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoke98%2Ficlouddesktop/lists"}