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
Here's the steps I completed. #1
Comments
It looks like an error with the captcha who can’t display correctly. This codeline is important:
Which is you use and which x-Server you have? |
A quick workaround: Change the obove lines of code to:
On error audible-api now printes you the url for captcha on screen and you have to open the link with a webbrowser. |
Sorry there is a error in my code. Correct is:
|
Can you please update audible with |
Just installed the new version from pip. I am not running an x-server my use case needs me to get it running on a headless machine. Is there any ways to print out the URL so I can open and enter it manually? |
I have released version 1.4 on pypi now. Please update again. How you execute the script? Tru a ssh session? Then you have the output in console and you can try following code:
Now the Captcha url will be prompted in your ssh console and you can copy&past them to a Webbrowser and insert captcha answer in console. |
If you have success don’t forget to save session. Otherwise you can try to execute the script on a local machine and save session to file. Then you can store the session file in project folder on your headless machine and init a session with |
success! Still not sure how to save a session tho, right now I have to type in a Captcha each time I call the script. The last snip of code you shared is for loading a saved session. How do I go about saving the session to begin with? Once I get that figured out, I should be able to put the pieces together from there.
I'm just executing a script through a ssh session. Basically: Another quick question, does the local="us" also work with the audible.ca ? the canadian version? I seemed to be getting the results from my library, so I think it is?... |
In the README I wrote how to save session. Here are two examples:
Hint:
|
! Got it working, just needed to add |
I don’t know if you can use an session file from us store to call canadian audible api. I have add canadian now to my code but will them upload later. In germany it‘s now 1am. Meanwhile you can open the localization.py delivered by audible module and rewrite to:
And then you can
|
I just tried it, yes you can use a session file from the US to call the Canadian api. It worked for me. I just tweaked my localization file manually here. I'll pull in the changes with pip later when you update. Have a good night! |
Added the Canadian Localization from #1
That sounds great. Can you try follow code and tell me in what currency the prices are?
If the prices are in CAD all is fine. But if they in USD you need a new session file from ca store. |
Ok, I setup a little test. Using my session-us.key (the session key generated using local="us") de -> us -> uk -> fr -> ca -> So I can conclude that my session-key works for the us local and the ca local. However for the de, uk, fr local I get those responses. I think this might be the case because I have never bought anything from those other 3 stores, so I have no data returned. As a side note, whats the best way to parse the data returned from each api call? is it JSON formatted? |
Thanks for your help. The response type is a python dictionary. |
I must correct me. The api answer is in json. But this app converted them to a python dictionary. |
No problem, if I can help with anything let me know. Python Dictionary! I never would have guessed... I was trying to parse them as json and it just wasn't working... was starting to pull my hair out... |
First I thought to output the response as json. But as json you can‘t work correctly with the response. So I have decided me to output the response as a 'classic' python dictionary. I would close this issue now. |
pip install audible
created a test.py file.
executed that file. with python3.6
python3.6 test.py
the results I got back are.
I realize I need to register, however I have no idea how to go about doing that. Is there any sample code on how to go about doing that?
The text was updated successfully, but these errors were encountered: