From f070e7693a9e069380147bff50d2aa64bfdb784e Mon Sep 17 00:00:00 2001 From: wangben04 Date: Wed, 29 May 2019 18:09:01 +0800 Subject: [PATCH] change url --- lib/safari/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/safari/index.js b/lib/safari/index.js index abc0d34..a32e777 100644 --- a/lib/safari/index.js +++ b/lib/safari/index.js @@ -16,7 +16,8 @@ const debug = require('debug')('safari'), const Safari = function Safari(debug) { // ## prepare base settings - this.baseUrl = "https://www.safaribooksonline.com"; + this.authUrl = "https://www.oreilly.com"; + this.baseUrl = "https://learning.oreilly.com"; this.clientSecret = "f52b3e30b68c1820adb08609c799cb6da1c29975"; this.clientId = "446a8a270214734f42a7"; this.books = {}; @@ -75,7 +76,7 @@ Safari.prototype.authorizeUser = function authorizeUser(username, password) { // ## prepare options for oauth request let options = { method: 'POST', - uri: `${this.baseUrl}/oauth2/access_token/`, + uri: `${this.authUrl}/oauth2/access_token/`, form: { "client_id" : this.clientId, "client_secret" : this.clientSecret,