Comments (11)
Until the Brazilian marketplace is hardcoded in my package it can be used these way:
from audible.localization import Locale
brazil_locale = Locale("br", "com.br", "A10J1VAYUDTYRN")
Now you can use the brazil_locale
as locale
keyword so:
from audible import Authenticator, Client, AsyncClient
# login
login = Authenticator.from_login(…, locale=brazil_locale)
# login external
login_external = Authenticator.from_login_external(locale=brazil_locale, …)
# load credentials
auth = Authenticator.from_file(…, locale=brazil_locale)
from audible.
The Brazilian marketplace can be tested out using TestPyPI with these command
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ audible==0.8.3.dev1695285418
Comments are welcome.
from audible.
Thanks for your Audible's support to Brazilian marketplace. Is there anything to do in Audible-cli's code to support it? Even using Audible development version 0.8.3, Audible-cli does not recognise Audible BR.
from audible.
I does not know that you want to use audible-cli
. The brazil
marketplace must be implemented there. I will rework audible-cli
soon to create the marketplaces dynamically from the audible
package.
In the meantime you can change the source code of the following files in audible-cli
:
cmds/cmd_manage.py
cmds/cmd_api.py
cmds/cmd_quickstart.py
In each of these files are exist one line(s) ["us", "ca", "uk", "au", "fr", "de", "es", "jp", "it", "in"]
.
You have to extend the list with br
. The result should looks ["us", "ca", "uk", "au", "fr", "de", "es", "jp", "it", "in", "br"]
.
If you modify audible-cli
these way and install the audible dev version
in the same venv (if you use a venv) then it will work.
from audible.
@fcarreira66
audible-cli
v0.2.5 is now on PyPI. The update supports dynamically loading of audible
marketplaces. So you only need to install audible_cli
and then audible dev version
into the same venv and it will work.
from audible.
@fcarreira66
Another good news. I've updated audible
to v0.9.0 now. If you reinstall audible-cli
it will now work out of the box. But make sure that the new audible package is also updated.
from audible.
Wow, I apreciate your effort, thank you!
But, it seems that Audible BR is not working (yet) for login via external browser (I am using Audible-cli version 0.2.5 and Audible version 0.9.0).
When I ran Audible-Cli and chose external browser, the link was generated and the response of Audible BR site was: https://www.amazon.com.br/ap/404
When I typed my credentials (Amazon BR's login and password), audible-cli exited with error:
Login with amazon to your audible account now.
Captcha found
Open Captcha with default image viewer [Y/n]: y
Answer for CAPTCHA: ******
2FA is activated for this account.
Please enter OTP Code: ******
Uncaught Exception
Traceback (most recent call last):
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\audible_cli\cli.py", line 60, in main
sys.exit(cli(*args, **kwargs))
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\audible_cli\cmds\cmd_quickstart.py", line 162, in cli
build_auth_file(
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\audible_cli\utils.py", line 102, in build_auth_file
auth = Authenticator.from_login(
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\audible\auth.py", line 408, in from_login
login_device = login(
File "C:\Users\My_login\AppData\Roaming\Python\Python311\site-packages\audible\login.py", line 491, in login
raise Exception("Login failed. Please check the log.")
Exception: Login failed. Please check the log.
Is there a log file for this? Where is it location?
Again, I am really thanksful for your help.
from audible.
@fcarreira66
I've to look deeper into this issue.
In the meantime you can use the us
locale for the quickstart. Then go to the config dir and change the country_code
in the config.toml
file to br
.
Edit:
One good news: I've found the reason for your issue with the external login. The bad: external login is not so easy to realize for the br
marketplace.
The background:
The browser redirects to a page /ap/maplanding after a successfully login. This will work on all other marketplaces. But the br
server responses with a HTTP 302 redirect to https://www.amazon.com.br/ap/404
instead of showing the requested /ap/maplanding
url. But if you use the dev tools on Chrome you can search in the location
header off any response for the ap/maplanding
url. I'm hope you understand what I mean.
from audible.
@fcarreira66
If you update audible
to v0.9.1 then you are now able to login to brazilian marketplace. External login will not work without additional user work.
from audible.
Yes, thank you! It worked with audible v.0.9.1. I ran **audible quickstart** with my Audible BR's credentials and I got it. Not tested with external login via browser.
from audible.
Great to hear that. I'll close this issue now. Please open a new one if you encounter in any other issue.
from audible.
Related Issues (20)
- 错误提示 HOT 19
- Quality is set to `Extreme` even set to `high` HOT 1
- TEST: New device registration method HOT 4
- Extract Audible Bookmark Notes HOT 3
- Issue getting activation bytes from auth server HOT 9
- Switch to poetry, implement CI+CD, remove Python version <3.8
- Lift upper version restriction on `httpx`. HOT 3
- Is there any way to get a list of books in a series? HOT 1
- Amazon authentication code not handled properly HOT 2
- I need some help with metadata HOT 2
- Brazil Account Can not login by external_login HOT 3
- RecursionError introduced in 0.9.0 in some cases HOT 3
- API doc: Only High and Normal is allowed as quality
- `valid_mail` regex is too strict HOT 4
- How does the BestSellers sort_by option in the APIs work? HOT 3
- Where does the file get stored with to_file() HOT 5
- Can't filter plus catalog books from 'catalog/products' HOT 9
- state token for library requests HOT 2
- response_callback no longer works properly with the endpoint: https://cde-ta-g7g.amazon.com/FionaCDEServiceEngine/sidecar HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audible.