Giter Site home page Giter Site logo

haoke98 / iclouddesktop Goto Github PK

View Code? Open in Web Editor NEW
35.0 1.0 6.0 16.05 MB

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

License: Other

Python 100.00%
icloud icloud-drive icloud-photos pyhthon python3 backup pyicloud sdk

iclouddesktop's Introduction

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

iclouddesktop's People

Contributors

haoke98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

iclouddesktop's Issues

并发采集问题

错误信息:Sync zone CAS Op-Lock failed. There was a concurrent write and this operation was rejected. Retry request

没有下载照片

加了--china-account在之后可以认证成功了, 绿屏一直滚动,最后完成后没有下载照片

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.