Skip to content

icloud python 客户端, 可以操作相册, 云盘, Notes, 联系簿, 设备位置等等, 只要是在iCloud网页端上可进行的操作都能进行

License

Notifications You must be signed in to change notification settings

Haoke98/iCloudDesktop

Repository files navigation

iCloud Desktop

English | 简体中文

Image 1 Image 1
Preview of home page and interactions Preview of login page

相关项目

  • 🚀 iCloudSDK 是一个基于Python的icloud通用API调用SDK依赖库.任何一个python项目导入便可使用.
  • ☘️ iCloudDjango 是一个DjangoApp, 在任何一个Django项目中导入便可使用.

Usage

Usage: icloud.py [OPTIONS] COMMAND [ARGS]...

Options:
  -u, --username <username>  Your iCloud username or email address  [required]
  -p, --password <password>  Your iCloud password (default: use PyiCloud
                             keyring or prompt for password)  [required]

  --china-account            Specify the "HOME_ENDPOINT" and "SETUP_ENDPOINT"
                             for the "China Mainland Accounts".

  --version                  Show the version and exit.
  --help                     Show this message and exit.

Commands:
  device          Device and Location, Find device Location, Get device...
  photo-download  Manage Photos on your icloud.
  test            Do some experimental tes.

Photos Download (2FA)

Usage: icloud.py photo-download <options>

Options:
  -d, --directory <directory>    Local directory that should be used for
                                 download

  --recent INTEGER RANGE         Number of recent photos to download (default:
                                 download all photos)

  --auto-delete                  Scans the "Recently Deleted" folder and
                                 deletes any files found in there. (If you
                                 restore the photo in iCloud, it will be
                                 downloaded again.)

  --modify-olds                  Modify the "Created Time" of the old files
                                 that already been in the folder.

  --workers INTEGER RANGE        Number of the thread to download
                                 photo.(Default is 3)

  --transfer-album <album_name>  Determine the album that will be downloaded.
  --help                         Show this message and exit.

Example 1

icloud -d /external/SADAM/icloud/photos/ --recent 500

Example 2

icloud -u <username> -p <password> -d /external/SADAM/icloud/photos/ --recent 500

Example 3

icloud -u <username> -p <password>
--china-account
photo-download
-d
/Volumes/share/SADAM/icloud/photos
--transfer-album
Hidden
--modify-olds
--auto-delete
--workers
1

Automatically start every half hour through crontab

*/30 * * * * /<python absolute path>/python3.9 /<project absolute path>/icloud.py -u <icloud account> -p <password> --china-account photo-download -d /external /SADAM/icloud/photos/ --transfer-album Transfer --auto-delete >> /opt/icloud-killer/logs/last-$(date "+%Y%m%d%H%M").log 2>&1

Driver And Files (2FA)

Reminds (2FA)

Contact (2FA)

Device And Location (Weak 2FA: Just send)

  • Get device info.
    • location
    • Status
    • Battery level
    • Device model
    • Device name
    • Device ID
  • Remote Control
    • locking device
    • Show message
    • Play sound
api.iphone.location()
{
  'isOld': True,
  'isInaccurate': False,
  'positionType': 'Wifi',
  'secureLocation': None,
  'secureLocationTs': 0,
  'altitude': 0.0,
  'latitude': 43.894873066105184,
  //纬度
  'longitude': 87.58595865485619,
  //经度
  'horizontalAccuracy': 65.0,
  //水平精度
  'verticalAccuracy': 0.0,
  //垂直精度
  'timeStamp': 1670048465162,
  //时间戳
  'floorLevel': 0,
  'locationType': '',
  'locationFinished': True,
  'locationMode': None
}

Development Plan

  • implements displaying Assets in different orders.
  • 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).
  • Implement the function of migrating Assets to Immich with one click.
  • Data migration function
    • One-click migration and synchronization removed from iCloud (free up iCloud space)
    • Support migration to local hard disk (directory)
    • Support migration to third-party platforms:
  • setting menu
    • View cache
    • Clear cache
    • proxy settings
    • Account Management
      • You can delete the remembered account password

Contribution & Development Specifications

💡 Friends are very welcome to contribute code to maintain the repo together❕

  • Developers who have made significant contributions can gain the authority to control the development direction of the project
  • Prohibit network programming in the main thread

Star History

Star History Chart

联系我们

Problems:

  • 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)
  • Missing apple_id field
    • Detailed error message:
      Traceback (most recent call last):
        File "test.py", line 10, in <module>
          api = PyiCloudService("***", "***")
        File "/usr/local/lib/python3.9/site-packages/pyicloud/base.py", line 268, in __init__
          self.authenticate()
        File "/usr/local/lib/python3.9/site-packages/pyicloud/base.py", line 328, in authenticate
          self._authenticate_with_token()
        File "/usr/local/lib/python3.9/site-packages/pyicloud/base.py", line 350, in _authenticate_with_token
          raise PyiCloudFailedLoginException(msg, error)
      pyicloud.exceptions.PyiCloudFailedLoginException: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))
    • solution:

Related Links

  1. PyiCloud PyPI Home Page
  2. PyiCloud GitHub Home Page

About

icloud python 客户端, 可以操作相册, 云盘, Notes, 联系簿, 设备位置等等, 只要是在iCloud网页端上可进行的操作都能进行

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages