Skip to content
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

Download fails with StatusCodeError: 302 - undefined #58

Open
ntfk55 opened this issue Apr 24, 2019 · 10 comments
Open

Download fails with StatusCodeError: 302 - undefined #58

ntfk55 opened this issue Apr 24, 2019 · 10 comments

Comments

@ntfk55
Copy link

ntfk55 commented Apr 24, 2019

attempting to execute the following results in StatusCodeError: 302 - undefined

This is caused by the incorrect baseurl in index.js (as resolved by #54)

safaribooks-downloader -b 9781449368098 -u removed -p removed -o E:\DATA\EBOOKS\testbook.epub
debug

@sombrerox
Copy link

@ntfk55 Safari made redesign of their website, the base URL which is specified in safari module is no longer valid (safaribooksonline.com), if you change that to oreilly.com user authorization will complete, but there will be some additional issues then caused by this redesign of the website. Hope we get updated version soon.

@giovapanasiti
Copy link

I've fixed it and opened a pull request

#59

@erstearns
Copy link

Thank you all for your work on this! Also got this error, went into the index & made the base URL change, but now running into a new error:

[safari-downloader] RequestError: Error: getaddrinfo ENOTFOUND www.learning.oreilly.com www.learning.oreilly.com:443

Any ideas on why this is happening? Thank you in advance.

@sombrerox
Copy link

@erstearns lose the "www", base URL should be "https://learning.oreilly.com"

@erstearns
Copy link

@sombrerox Thank you! That was the issue!

@ferege
Copy link

ferege commented May 22, 2019

error 302
hi how can resolve this?

@sombrerox sombrerox mentioned this issue May 22, 2019
@Yamilquery
Copy link

@erstearns lose the "www", base URL should be "https://learning.oreilly.com"

Great, it works!

@makerling
Copy link

I'm still getting this 302 issue, even when changing the base URL to "https://learning.oreilly.com"

@max-kazak
Copy link

@makerling , I had the same problem. Uninstalling and reinstalling the whole thing helped.

@piczmar
Copy link

piczmar commented Oct 29, 2020

Hi, Why this is still not merged yet to master? The fix described above worked for me.

$ git diff lib/safari/index.js

diff --git a/lib/safari/index.js b/lib/safari/index.js
index abc0d34..17f3e22 100644
--- a/lib/safari/index.js
+++ b/lib/safari/index.js
@@ -16,7 +16,7 @@ const debug = require('debug')('safari'),
 const Safari = function Safari(debug) {

   // ## prepare base settings
-  this.baseUrl = "https://www.safaribooksonline.com";
+  this.baseUrl = "https://learning.oreilly.com";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants