Closed DamianoMagrini closed 3 months ago
Occasionally there seems to be a requirement to have a recaptcha token in the login form, it's not always but it's enough to not make the script not work many times and I don't want to deal with it
I actually started working on a browser extension that would be able to bypass that but I'm having problems extracting the zip file with password
Hey, sorry for not getting back. Would you like to share the code you have for the extension? I can try to see what I can do
No worries, here is the code, it's made only to work on firefox, it's kinda messy but you should be able to get the hang of it... HUB Young and myLIM are working as far as I remember, the broken one ofc is the Pearson one.
Let me know if there are any updates
Ok so I had a look at it 💀 sorry for the wait
The API was updated and now:
'https://etext-ise.pearson.com/marin/api/1.0/products/' + localStorage.getItem('bookId')
using the JWT headers (bearer auth), which I was only able to get to work under the assumption that the client id is cGnFEyiajGgv2EhcShCPBa7jqwSFpSG5
https://api-prod.gls.pearson-intl.com/book/{book id}
doesn't seem to work anymore, so it would have to be replaced by the two endpoints used in the Node app (this repo), i.e. https://api-prod.gls.pearson-intl.com/user/${user id}/product
and https://stpaperapi.prd-prsn.com/etext/v2/courseboot/convergedreader/compositeBookShelf/
, but the latter requires x-auth token which relies on doing a fetch with { redirect: 'manual' }
to extract the iesCode
(so it does not expire immediately), but that's not possible in browser js because it turns the response into an opaqueredirect
type response, from which the redirect URI cannot be extractedSo I wasn't even able to get to the point of seeing the zip files... not automatically at least.
However, with very minor changes (hardcoding the client ID because https://www.pearson.it/login/
now redirects to another place) this repo is still working 🙃
I guess we can close this for now~ thank you again for your precious work!
@Leone25 the script still works perfectly for me (tried both PDFs and e-texts). How is it not working? I've noticed you archived it on your GitHub.