diff --git a/config.example.ini b/config.example.ini index 0521698..f23c82a 100644 --- a/config.example.ini +++ b/config.example.ini @@ -1,6 +1,7 @@ [apple] email = apple_icloud_email password = apple_icloud_password +cookie_directory = COOKIE_DIRECTORY [nextcloud] server = https://cloud.example.com diff --git a/icloud_to_nextcloud.py b/icloud_to_nextcloud.py index a0654a4..4ea94cf 100644 --- a/icloud_to_nextcloud.py +++ b/icloud_to_nextcloud.py @@ -99,12 +99,12 @@ def get_icloud_location(config): global code_2fa email = config['apple']['email'] password = config['apple']['password'] - api = PyiCloudService(email, password) + api = PyiCloudService(email, password=password, cookie_directory=config['apple']['cookie_directory']) if api.requires_2fa: print( "Two-factor authentication required. " - "Head over to http://localhost:8080 and fill-in the 2FA code." + f"Head over to http://{config['webserver']['host']}:{config['webserver']['port']} and fill-in the 2FA code." ) server = StoppableCherootServer( host=config['webserver']['host'],