installation command to be updated? #97
Replies: 12 comments 21 replies
-
Hi @giovannicoppola, I'm doing well so far. The job is just stressful right now. There is an issue in your requirements.txt. You have to change |
Beta Was this translation helpful? Give feedback.
-
awesome thanks! I get this error but the library seems to be there? (not sure how to simulate a fresh install on my machine)
|
Beta Was this translation helpful? Give feedback.
-
@giovannicoppola |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi @giovannicoppola, import audible
auth = Authenticator.from_file(…)
auth.deregister_device() After a successfully deregistration you can delete the auth file. You can use the Amazon website to remove a device, too. |
Beta Was this translation helpful? Give feedback.
-
sorry the thread might have been lost, I was referring to your Goodreads
API script?
…On Fri, Sep 23, 2022 at 6:47 AM mkb79 ***@***.***> wrote:
First question: as I am testing the register function, I realized I am
registering a new device every time. Is there a way to delete them?
Hi @giovannicoppola <https://github.com/giovannicoppola>,
You can deregister a device using an Authenticator instance with your
auth data like so:
import audible
auth = Authenticator.from_file(…)
auth.deregister_device()
After a successfully deregistration you can delete the auth file. You can
use the Amazon website to remove a device, too.
—
Reply to this email directly, view it on GitHub
<#97 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBYSZPZEOJHUWC6LL6KG3V7WDDDANCNFSM5ZAR654A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks, still having trouble interacting with the API. Would you have an
example of a GET request in Python (I am using the `requests` package) to
get, for example, a user's shelves
<https://www.goodreads.com/api/index#shelves.list>?
…On Fri, Sep 23, 2022 at 6:57 AM mkb79 ***@***.***> wrote:
Take a look on my GoodreadsAPi gist
<https://gist.github.com/mkb79/2a3f0acb3a75d3cf82d0c85a29497d22>. There
you can find a function to deregister a Goodreads device. Please take
attention that the access token is not expired. Otherwise you have to
refresh them before you deregister.
—
Reply to this email directly, view it on GitHub
<#97 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBYSZAI3IUXRZ5XTSL4STV7WEKJANCNFSM5ZAR654A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I get a 401 code using this below. my email is my username AT gmail.com. thanks!!
|
Beta Was this translation helpful? Give feedback.
-
it works if I create a new device, so you are right it must have to do with
the refresh token. is 3600 in `'expires_in': '3600'` seconds?
…On Wed, Sep 28, 2022 at 7:45 AM mkb79 ***@***.***> wrote:
Are you able to refresh your Goodreads access token with your refresh
token? I tried it out right now and all working fine for me (refreshing,
get user shelves and user infos from API)!
—
Reply to this email directly, view it on GitHub
<#97 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBYS23K5ZSVJ6MAZKCFPTWAQVT5ANCNFSM5ZAR654A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yeah, an access token expires after 1 hour. Then you need to refresh the token. |
Beta Was this translation helpful? Give feedback.
-
no luck 😟
…On Tue, Sep 27, 2022 at 9:51 AM mkb79 ***@***.***> wrote:
This should work with requests module and a valid access token:
import requests
access_token = ...base_headers = {
"User-Agent": "Goodreads/4.0.1 (iPhone; iOS 15.4.1; Scale/3.00)",
"Accept-Language": "en-US;q=1",
"x-amz-access-token": access_token
}
with requests.Session(headers=base_headers) as client:
# get user id
r = client.get("https://www.goodreads.com/api/auth_user")
user_id = ...
params = {"user_id": user_id}
r = client.get("https://www.goodreads.com/shelf/list.xml", params=params)
—
Reply to this email directly, view it on GitHub
<#97 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBYS4YXEMB2WA77YZ2FH3WAL3WFANCNFSM5ZAR654A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I get a 401 code using this below. my email is my username AT gmail.com.
thanks!!
r=requests.get("https://www.goodreads.com/shelf/list.xml",
headers={
"x-amz-access-token":ACCESS_TOKEN,
"User-Agent": 'Goodreads/4.0.1 (iPhone; iOS 15.4.1; Scale/3.00)'
})
…On Tue, Sep 27, 2022 at 9:26 AM mkb79 ***@***.***> wrote:
You have to authenticate to the API using your access token, retrieved
after a device registration or a token refresh request (if the access token
was expired)! Then you have to add the access token to your request as the
x-amz-access-token header. Then you can request all API endpoints from
https://www.goodreads.com/api/index without providing the developer key.
I've wrote an private POC package. This uses the httpx package. I can
share this with you using a private channel (e.g. mail).
—
Reply to this email directly, view it on GitHub
<#97 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBYS7S6NCDUJU4U24RUZTWALYZNANCNFSM5ZAR654A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @mkb79 I hope you are well! A user of my workflow could not install the package and I realized my command fails now (something changed?).
This below is my requirement.txt file, should I change anything?
pyparsing<3,>=2.4.2
audible-cli @ git+https://github.com/mkb79/audible-cli@development
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions