Closed Wisperer closed 2 years ago
I suspect this is due to the site shifting from comixology to read.kindle.com, and the headers still referencing comixology.comics.
I'm running this on a brand new install of Ubunutu 22.04 LTS with only the following have been run...
sudo apt update; sudo apt dist-upgrade; sudo apt upgrade; sudo apt autoremove
sudo apt install vim git python3-pip
git clone https://github.com/athrowaway2021/comix
cd comix
pip install -r requirements.txt
I then added my details to config.py
and tried to run the script. I found I needed to run pip install xmltodict
to get the script to run. I then tried again and got the same message as OP.
Getting auth token . . .
{"response": {"challenge": {"challenge_reason": "HandleOnWebView", "uri": "https://www.amazon.com/ap/challenge?arb=<removed>"}}, "request_id": "<removed>"}
Traceback (most recent call last):
File "/home/james/comix/comix.py", line 142, in <module>
cmx = Cmx(None)
File "/home/james/comix/comix.py", line 23, in __init__
self.auth_token = amazon_api.login(config.EMAIL, config.PASSWORD)["access_token"]
TypeError: 'NoneType' object is not subscriptable
Try going to Amazon.com in your web browser, logging out of your account, and then logging back on again. I think this following line is the clue:
{"response": {"challenge": {"challenge_reason": "HandleOnWebView", "uri": "https://www.amazon.com/ap/challenge?arb=
What happened for me is that I needed to respond to a prompt that it is actually me trying to login. You can't get at that prompt using the script, but it appears reconfirming in the web browser that you are you is enough so that it stops happening in the script. I generally use Linux but loaded the script in Windows and I ran into this exact situation. Once I confirmed things in the browser, the script worked fine.
The above reply is correct, 3309195bd433f911dd2b10b76120875a966a3eb1 adds a message that tells users with 2FA to relogin in browser if this issue occurs.
Known good password and email. Works fine with an older version of the script.
Ran with `python comix.py list' after adding account info to config.py