Comments (9)
That sounds really strange. I tried downloading several books as aax and aaxc today and all is running as expected.
Which marketplace you are using? The book you are trying to download is a book you have bought?
Can you try my audible-cli package?
from audible.
Yeah it is strange. I have not seen this before. Sure I can try the cli. It was 3 different books I bought and a couple "included" ones- all had the same issue. Those were all of the ones i tried. It was from the US marketplace.
from audible.
So i pulled down a new copy of the regular audible project (0.5.4), and retried the example code. Still 403. However, when I setup the cli (0.5.3) project it worked. Assuming nothing significant in the two minor versions, it looks like the difference is httpx.AsyncClient.stream
vs httpx.stream
. It seems maybe the audible service changed. Before the URL params given by audible were enough to authenticate/authorize, but now it is not the case.
Also, even in your cli project the download URL says its for an aax file even though I was requesting an aaxc file.
from audible.
I saw in your opening post that you wrote with httpx.stream("GET", url) as r:
. This means the request is not authenticated.
Can you try the following:
auth = audible.Authenticator.from_file(…)
with httpx.stream("GET", url, auth=auth) as r:
from audible.
This gives a 403 as well. For some reason you need to use a client/async client object now-
auth = audible.Authenticator.from_file(…)
with httpx.Client(auth=auth).stream("GET", url) as r:
Maybe you'll find some solution i didnt see, but this is the only way I've seen it work starting this month.
from audible.
It seems httpx.stream does not send some of the required headers that httpx.Client does. You can add the headers manually as seen in the example gist. I didn't find anything in the httpx github issues so I'm not sure if this is a bug or expected. Also, if you're using offline_url, the auth portion is not required.
https://gist.github.com/jesseconnr/18ab04422ad11a7b93c205a2f4f5fdb3
from audible.
Thank you booth for your very important information. I will take a look on the httpx source code.
FYI:
I‘m short on time this week but I will give my best.
from audible.
Here's some additional discovery on the httpx versions.
0.16.1 - missing headers (audible depends on 0.16.*)
0.18.1 - sends all headers (this is the latest version)
0.14.3 - also sends all headers (this is just a version an older project of mine was using)
If there aren't any breaking changes it could be as easy and updating the dependency but either way it's an easy thing to work around.
from audible.
@jesseconnr Thank you for your work! I've created a pr now to update httpx to 0.18.x for testing.
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
- Audible brazil HOT 11
- 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
- encryptedPwd HOT 5
- 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.