-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: new AppleID auth with srp #972
fix: new AppleID auth with srp #972
Conversation
src/pyicloud_ipd/base.py
Outdated
params={"isRememberMeEnabled": "true"}, | ||
data=json.dumps(data), | ||
headers=headers, | ||
) | ||
if response.status_code == 401: | ||
raise PyiCloudAPIResponseException(response.status_code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise PyiCloudAPIResponseException(response.status_code) | |
raise PyiCloudAPIResponseException(response.text , str(response.status_code)) |
PyiCloudAPIResponseException
takes two parameters, both must be strings to pass type checks.
response
is a Response object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for getting this fixed.
src/pyicloud_ipd/base.py
Outdated
try: | ||
response = self.session.post("%s/signin/init" % self.AUTH_ENDPOINT, data=json.dumps(data), headers=headers) | ||
if response.status_code == 401: | ||
raise PyiCloudAPIResponseException(response.status_code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise PyiCloudAPIResponseException(response.status_code) | |
raise PyiCloudAPIResponseException(response.text , str(response.status_code)) |
Similar as below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
input="0\n654321\n", | ||
) | ||
assert result.exit_code == 0 | ||
shutil.copytree(cookie_master_path, cookie_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change have to be done in the following files as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @AndreyNikiforov mentioned that he will fix it. I will then rebase this branch and the tests should pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased. Also fixed CodeQL and type check warnings. Now this PR is ready.
1a1b8de
to
3d97c20
Compare
d796f99
into
icloud-photos-downloader:master
Fixes #970