Git Product home page Git Product logo

Comments (17)

mkb79 avatar mkb79 commented on May 24, 2024

Your issue seems to be identical with #72. I think I know what happens. Will look at this at soon as possible!

from audible.

gigs94 avatar gigs94 commented on May 24, 2024

I'm getting this error as well with the latest master branch installed... let me know if you want me to test other branches.

Traceback (most recent call last):
  File "./get_books.py", line 23, in <module>
    auth = audible.auth.Authenticator.from_login(
  File "/usr/local/anaconda3/lib/python3.8/site-packages/audible/auth.py", line 368, in from_login
    login_device = login(
  File "/usr/local/anaconda3/lib/python3.8/site-packages/audible/login.py", line 388, in login
    method, url = get_next_action_from_soup(login_soup)
  File "/usr/local/anaconda3/lib/python3.8/site-packages/audible/login.py", line 126, in get_next_action_from_soup
    method = form["method"]
  File "/usr/local/anaconda3/lib/python3.8/site-packages/bs4/element.py", line 1406, in __getitem__
    return self.attrs[key]
KeyError: 'method'

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

The real problem is not on the captcha page. Audible uses httpx to send requests to the server. Can you enable debug logging for the httpx module and rerun your script? Then you can see, which requests are made and which was the last requested url.

from audible.

lmergner avatar lmergner commented on May 24, 2024

I can't tell if I'm exposing my password or username for audible by sharing this log snippet. Please let me know!

$ pip list | grep audible
audible              0.6.0
$ python --version
Python 3.10.1
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=HLUpE0u2CScFj38Xb-7_m2y6WKBt442FtdfzO_AjNR0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_audible_ios_us&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_audible_ios&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A4645324342434537353442463442363942383732384534353432374641373237234132435a4a5a474c4b324a4a564d&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&marketPlaceId=AF2M0KC94RCEA&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 "HTTP/1.1 200 OK"
DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin/131-0022030-0687802 "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/86cd0db4957146aabd14628fe047acac.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642264409&Signature=B4BzOhAAMKWy3lKvRdZmIsJxpk0%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: n735tx
Traceback (most recent call last):
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 213, in <module>
    cli()
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 199, in library
    get_audible_library(
  File "/Users/lmerg/code/abook/abook/library.py", line 18, in get_audible_library
    auth = audible.Authenticator.from_login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/auth.py", line 368, in from_login
    login_device = login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/login.py", line 388, in login
    method, url = get_next_action_from_soup(login_soup)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/login.py", line 126, in get_next_action_from_soup
    method = form["method"]
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/bs4/element.py", line 1486, in __getitem__
    return self.attrs[key]
KeyError: 'method'

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

Don’t worry, there are no username/password in the log. Can you use git and clone the master branch and install it. In my last commit I resolved the KeyError issue.

from audible.

lmergner avatar lmergner commented on May 24, 2024

With pip install -U git+https://github.com/mkb79/Audible#egg=audible I get a login error, which is progress of a sort.

[DEBUG] [__main__.py:118@cli] Found ffmpeg version 4.4.1
INFO:audible.login:Login with Amazon Account.
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=TVCMYcMQ5CP1i0UEHWaYPr0AKDTYDR9IRdz94fRPw8Q&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_audible_ios_us&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_audible_ios&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A3944323836353835354330463444433438343530464633353935303632333344234132435a4a5a474c4b324a4a564d&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&marketPlaceId=AF2M0KC94RCEA&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 "HTTP/1.1 200 OK"
DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin/130-0770017-3958167 "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/3dcfb3954499405f9459a6214a85d777.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642265498&Signature=fnB8TazoDibzpjY6z%2FMNUpKG6iQ%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: ghpd48
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/get "HTTP/1.1 301 Moved Permanently"
Traceback (most recent call last):
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 213, in <module>
    cli()
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 199, in library
    get_audible_library(
  File "/Users/lmerg/code/abook/abook/library.py", line 17, in get_audible_library
    auth = audible.Authenticator.from_login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/auth.py", line 368, in from_login
    login_device = login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/login.py", line 500, in login
    raise Exception("Login failed. Please check the log.")
Exception: Login failed. Please check the log.

I'm enabling debug logging, but I don't see any other logs that I can check.

logger = logging.getLogger(<my_library>)
httpx_logger = logging.getLogger("httpx")
httpx_logger.setLevel(logging.DEBUG)
audible_logger = logging.getLogger("audible.login")
audible_logger.setLevel(logging.DEBUG)

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

Okay. There could be two things which could be cause the error.

  1. There are multiple form tags and the wrong is selected through the function

  2. Audible changes something on the captchas page.

Let me try something.

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

Can you try this repo https://github.com/mkb79/Audible/tree/issue-73 please?! This will print out all forms found on a page. Then I can see if the captcha page contains additional forms.

from audible.

lmergner avatar lmergner commented on May 24, 2024

Sorry first time pulling from a github issue. How do I pip install it? I've added the commit hash to the url already.

$ pip install -U git+https://github.com/mkb79/Audible/tree/issue-73@c3823c04659128cbfabefa1a9b4b5046de769584#egg=audible
Collecting audible
  Cloning https://github.com/mkb79/Audible/tree/issue-73 (to revision c3823c04659128cbfabefa1a9b4b5046de769584) to /private/var/folders/tj/sz8275nx2kj4czqq2qsqlwf40000gn/T/pip-install-0q4pgyt_/audible_610ec47cbfed4deb83f56035d369f5b9
  Running command git clone --filter=blob:none -q https://github.com/mkb79/Audible/tree/issue-73 /private/var/folders/tj/sz8275nx2kj4czqq2qsqlwf40000gn/T/pip-install-0q4pgyt_/audible_610ec47cbfed4deb83f56035d369f5b9
  fatal: repository 'https://github.com/mkb79/Audible/tree/issue-73/' not found

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

Best is you clone from github repo this way

git clone --branch issue-73 https://github.com/mkb79/Audible
cd audible-cli
pip install --upgrade .

from audible.

lmergner avatar lmergner commented on May 24, 2024

You know, when you put it like that, I feel very silly.

If it matters, I'm in the "us" marketplace.

INFO:audible.login:Login with Amazon Account.
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=918f0QmoQ46uNsXbLVLCJsApCUj979KuAjEwjlAcZBw&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_audible_ios_us&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_audible_ios&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A4537444430323938303335443430343242383746433845303533384531424333234132435a4a5a474c4b324a4a564d&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&marketPlaceId=AF2M0KC94RCEA&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 "HTTP/1.1 200 OK"
Found 2 on page.
action https://www.amazon.com/ap/signin/141-2438372-0520154
method post

action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin/141-2438372-0520154 "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/7d9f16fff3f54846a08c37bea024335b.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642268022&Signature=CP7YLaDrdW1G3ibjy3vTHFnWXVY%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: zz4vfh
Found 2 on page.
action https://www.amazon.com/ap/signin
method post

action get
method None

DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/get "HTTP/1.1 301 Moved Permanently"
Traceback (most recent call last):
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 209, in <module>
    cli()
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 193, in library
    get_audible_library(
  File "/Users/lmerg/code/abook/abook/library.py", line 17, in get_audible_library
    auth = audible.Authenticator.from_login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/auth.py", line 368, in from_login
    login_device = login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/login.py", line 511, in login
    raise Exception("Login failed. Please check the log.")
Exception: Login failed. Please check the log.

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

Okay, good news. There are two forms and the wrong is selected. Now I need the name of the form (I forget these)! Can you delete the audible-cli folder and repeat the steps above (reinstall issue branch and test)!

With the name of the form I can solve the issue easy

from audible.

lmergner avatar lmergner commented on May 24, 2024
INFO:audible.login:Login with Amazon Account.
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=zKHOHVqgUWbNcvGUfjsCX9fYmwD72EQji7HDNw8TQBE&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_audible_ios_us&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_audible_ios&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A3739343142323141383742363438464439303942373345394445433145373132234132435a4a5a474c4b324a4a564d&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&marketPlaceId=AF2M0KC94RCEA&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 "HTTP/1.1 200 OK"
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin/134-8509596-8066427
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin/134-8509596-8066427 "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/374e39ed13254587b3fad9567dbe0a70.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642268593&Signature=cgnRIC7x2%2BgmhGEk46TaIM9ca5Y%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: 77sbm2
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/get "HTTP/1.1 403 Forbidden"
Traceback (most recent call last):
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 209, in <module>
    cli()
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 193, in library
    get_audible_library(
  File "/Users/lmerg/code/abook/abook/library.py", line 17, in get_audible_library
    auth = audible.Authenticator.from_login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/auth.py", line 368, in from_login
    login_device = login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/login.py", line 513, in login
    raise Exception("Login failed. Please check the log.")
Exception: Login failed. Please check the log.

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

I think I solved the issue now. Can you repeat your last step again (pull and reinstall)!

from audible.

lmergner avatar lmergner commented on May 24, 2024
INFO:audible.login:Login with Amazon Account.
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=FcBhcrZENqJWfjDH5EBMVFffwJsS9teyntIRB7rFSig&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_audible_ios_us&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_audible_ios&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A3245463630423136323434313433324541333043354337394246384637423231234132435a4a5a474c4b324a4a564d&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&marketPlaceId=AF2M0KC94RCEA&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 "HTTP/1.1 200 OK"
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin/136-0651603-2148857
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin/136-0651603-2148857 "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/14b4cc1acab94a9fb467b8fa49f22bc8.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642268940&Signature=3cpTvS2%2BR8Pwen%2FEtire5AB%2BneE%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: 7v6n6n
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: There was a problem Enter the characters as they are given in the challenge.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/225239f2755b4436a8ede486e6da5e84.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642268963&Signature=ZJ5zbCTu2X04z%2F%2Bkuz3jEzb2qwQ%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: znws6t
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: There was a problem Enter the characters as they are given in the challenge.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/0d338f4f867b4949b0378cafc5b9c98e.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642268979&Signature=vSjCheLlCEVh4qS%2FKDIyzMBovbg%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: 362w5w
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin "HTTP/1.1 302 Moved Temporarily"
Traceback (most recent call last):
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/lmerg/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 209, in <module>
    cli()
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/lmerg/code/abook/abook/__main__.py", line 193, in library
    get_audible_library(
  File "/Users/lmerg/code/abook/abook/library.py", line 17, in get_audible_library
    auth = audible.Authenticator.from_login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/auth.py", line 368, in from_login
    login_device = login(
  File "/Users/lmerg/.pyenv/versions/abook/lib/python3.10/site-packages/audible/login.py", line 513, in login
    raise Exception("Login failed. Please check the log.")
Exception: Login failed. Please check the log.

from audible.

mkb79 avatar mkb79 commented on May 24, 2024

I have committed changes. Can you try them. These should solve the new issue.

from audible.

lmergner avatar lmergner commented on May 24, 2024

Looks good. Thanks for the fix. I can't imagine how hard it is to keep up with unofficial API changes.

INFO:audible.login:Login with Amazon Account.
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=e018z4IlZgJkAJ1uFjVpBVUz6RRGZ-0lkoFCteQqDxE&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_audible_ios_us&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_audible_ios&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A4441303738414636453338353430333639394430373246374531453432313635234132435a4a5a474c4b324a4a564d&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&marketPlaceId=AF2M0KC94RCEA&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 "HTTP/1.1 200 OK"
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin/133-3796299-2950524
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin/133-3796299-2950524 "HTTP/1.1 200 OK"
ERROR:audible.login:Error message: Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.
DEBUG:httpx._client:HTTP Request: GET https://opfcaptcha-prod.s3.amazonaws.com/a7a651a91a9840b29bfa324fba373e35.jpg?AWSAccessKeyId=AKIA5WBBRBBB6V2IYVNM&Expires=1642270846&Signature=%2Bt6qLQ4tbSsLDi9rwIWX08f5b%2B0%3D "HTTP/1.1 200 OK"
Answer for CAPTCHA: t727s6
Found 2 on page.
name signIn
action https://www.amazon.com/ap/signin
method post

name ue_backdetect
action get
method None

DEBUG:httpx._client:HTTP Request: POST https://www.amazon.com/ap/signin "HTTP/1.1 302 Found"
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/challenge?ie=UTF8&arb=228efbd8-6699-495e-b9ad-0cd945cabd76 "HTTP/1.1 302 Found"
DEBUG:httpx._client:HTTP Request: GET https://www.amazon.com/ap/cvf/approval?arb=978303a6-2084-493c-a188-d8d28d042902&openid.assoc_handle=amzn_audible_ios_us&pageId=amzn_audible_ios&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fap%2Fsignin%3Fie%3DUTF8%26clientContext%3D132-8462583-4005936%26openid.pape.max_auth_age%3D0%26use_global_authentication%3Dfalse%26forceMobileLayout%3Dtrue%26accountStatusPolicy%3DP1%26openid.identity%3Dhttp%253A%252F%252Fspecs.openid.net%252Fauth%252F2.0%252Fidentifier_select%26use_audio_captcha%3Dfalse%26marketPlaceId%3DAF2M0KC94RCEA%26pageId%3Damzn_audible_ios%26arb%3Da9ffeeb9-a208-4ab3-b31c-feac2504b09f%26openid.return_to%3Dhttps%253A%252F%252Fwww.amazon.com%252Fap%252Fmaplanding%26openid.assoc_handle%3Damzn_audible_ios_us%26openid.oa2.response_type%3Dcode%26openid.mode%3Dcheckid_setup%26openid.ns.pape%3Dhttp%253A%252F%252Fspecs.openid.net%252Fextensions%252Fpape%252F1.0%26openid.ns.oa2%3Dhttp%253A%252F%252Fwww.amazon.com%252Fap%252Fext%252Foauth%252F2%26openid.oa2.code_challenge_method%3DS256%26openid.oa2.code_challenge%3De018z4IlZgJkAJ1uFjVpBVUz6RRGZ-0lkoFCteQqDxE%26openid.oa2.scope%3Ddevice_auth_access%26openid.claimed_id%3Dhttp%253A%252F%252Fspecs.openid.net%252Fauth%252F2.0%252Fidentifier_select%26openid.oa2.client_id%3Ddevice%253A4441303738414636453338353430333639394430373246374531453432313635234132435a4a5a474c4b324a4a564d%26openid.ns%3Dhttp%253A%252F%252Fspecs.openid.net%252Fauth%252F2.0 "HTTP/1.1 200 OK"
Approval alert detected! Amazon sends you a mail.
Please press ENTER when you approve the notification.

from audible.

Related Issues (20)

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.