Giter Club home page Giter Club logo

Comments (7)

gabrielelana avatar gabrielelana commented on June 16, 2024 2

Never mind, worst error of all, I've used the wrong password, actually it's more subtle than that, I was using an old account of safaribooks (the first O'Reilly platform to read books online)

When you use that on the safari website event them get confused, they don't tell you that the password is wrong (because it isn't) but that it refers to an old account that is no longer valid for the new platform

So I get that your script gets confused as well, with the correct password (😅) it works like a charm, as far as I am concerned you can close the issue, but I will leave my comments for future reference

from safaribooks.

suniltpn avatar suniltpn commented on June 16, 2024

This is the complete log
[24/Feb/2018 x:x:x] ** Welcome to SafariBooks! **
[24/Feb/2018 x:x:x] Logging into Safari Books Online...
[24/Feb/2018 xxxx:x:x] Retrieving book info...
[24/Feb/2018 xxxxxx API: Out-of-Session (Authentication credentials were not provided.).

from safaribooks.

lorenzodifuccia avatar lorenzodifuccia commented on June 16, 2024

Could you retry? Pull the last version of the program, I added some function for log verbosity.

from safaribooks.

franTarkenton avatar franTarkenton commented on June 16, 2024

I'm getting the same error, here is what is included in the log:
`[12/Mar/2018 15:03:08] ** Welcome to SafariBooks! **
[12/Mar/2018 15:03:08] Logging into Safari Books Online...
[12/Mar/2018 15:03:10] Retrieving book info...
[12/Mar/2018 15:03:11] API: Out-of-Session (Authentication credentials were not provided.).

[12/Mar/2018 15:03:11] Last request done:
URL: https://www.safaribooksonline.com/api/v1/book/9781680502848/
DATA: None
OTHERS: {}

401
Server: nginx/1.10.3 (Ubuntu)
Content-Type: application/json
Content-Language: en-US
X-Frame-Options: SAMEORIGIN
x-xss-protection: 1; mode=block
WWW-Authenticate: Bearer realm="api"
Allow: GET, HEAD, OPTIONS
x-content-type-options: nosniff
strict-transport-security: max-age=3600; includeSubDomains
Set-Cookie: logged_in=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/, sessionid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Domain=.www.safaribooksonline.com; expires=Mon, 26-Mar-2018 22:03:14 GMT; httponly; Max-Age=1209600; Path=/; secure, api_key=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/
Content-Length: 58
Accept-Ranges: bytes
Date: Mon, 12 Mar 2018 22:03:12 GMT
Via: 1.1 varnish
Connection: keep-alive
X-Client-IP: xxx.xx.xx.xxx
X-Served-By: cache-sea1044-SEA
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1520892192.424554,VS0,VE432
Vary: Accept, Accept-Language, Authorization, Cookie`

from safaribooks.

lorenzodifuccia avatar lorenzodifuccia commented on June 16, 2024

As you can see it's an Out-of-Session message, so use the --cred argument in order to perform again the login.

from safaribooks.

gabrielelana avatar gabrielelana commented on June 16, 2024

Unfortunately I have the same error with --cred argument with the same output

[13/May/2018 17:39:36] ** Welcome to SafariBooks! **
[13/May/2018 17:39:36] Logging into Safari Books Online...
[13/May/2018 17:39:38] Retrieving book info...
[13/May/2018 17:39:39] API: Out-of-Session (Authentication credentials were not provided.).

[13/May/2018 17:39:39] Last request done:
	URL: https://www.safaribooksonline.com/api/v1/book/9781491903063/
	DATA: None
	OTHERS: {}

	401
	Server: nginx/1.10.3 (Ubuntu)
	Content-Type: application/json
	Content-Language: en-US
	strict-transport-security: max-age=3600; includeSubDomains
	WWW-Authenticate: Bearer realm="api"
	x-xss-protection: 1; mode=block
	Allow: GET, HEAD, OPTIONS
	x-content-type-options: nosniff
	X-Frame-Options: SAMEORIGIN
	Set-Cookie: logged_in=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/, api_key=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/, sessionid=mhux5eznbvkpg1p8qtgrfqzua13lcwzh; Domain=.www.safaribooksonline.com; expires=Sun, 27-May-2018 15:39:40 GMT; httponly; Max-Age=1209600; Path=/; secure
	Content-Length: 58
	Accept-Ranges: bytes
	Date: Sun, 13 May 2018 15:39:39 GMT
	Via: 1.1 varnish
	Connection: keep-alive
	X-Client-IP: 2.39.28.199
	X-Served-By: cache-fra19150-FRA
	X-Cache: MISS
	X-Cache-Hits: 0
	X-Timer: S1526225979.798707,VS0,VE359
	Vary: Accept, Accept-Language, Authorization, Cookie

How does safari checks the login? Via cookies? I can see that the get_book_info is sending: corp_sessionid, csrfsafari, BrowserCookie, original_referrer and sessionid

How can I help you to debug more?

from safaribooks.

lorenzodifuccia avatar lorenzodifuccia commented on June 16, 2024

Thanks you!
I'll change the label of this issue to: read before new issue 😄

from safaribooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.