03-05-2007, 01:34 PM | #1 |
Addict
Posts: 202
Karma: 692
Join Date: Oct 2006
Device: SONY reader
|
Safari Online script
Hi
does anyone have a script that would go through a book in the Safari Online library and export the printer optimized pages so that it can be read on the SONY Reader? It would be for totally legal personal use. I do have access to Safari all I want it to be able to read books on my reader during my lunch break. If such a script does not exist please indicate if you're like me and would be helping out to write one. thanks |
03-05-2007, 01:57 PM | #2 |
Member
Posts: 21
Karma: 14
Join Date: Sep 2006
|
I, too, would really love to have a script like this. Maybe I could try to figure out their obfuscated js later this afternoon...
|
Advert | |
|
03-06-2007, 02:44 PM | #3 |
Uebermensch
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
|
Try debugging through Firebug... I spent a few hours trying to debug the obfuscated Javascript / Ajax code but it's really hellish to go through.
|
03-07-2007, 01:26 AM | #4 |
Addict
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
|
One way would be to write a .Net 2.0 app that hosts IE (i.e. a WebBrowser control), and then captures the window as an image.
I question, however, whether this would be legal. Its the equivalent of (say) ripping Netflix DVDs to my Zen Vision so I can watch them in the gym. I.e. it may seem like "fair use" but not be legal. |
03-07-2007, 04:31 AM | #5 |
Uebermensch
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
|
Well, the content is read through an Ajax interface and delivered to the browser in encrypted form. The browser then decrypts the content through the Safari javascript. So you could have it easier by hooking the point at which the browser has the text decrypted. Or just find out the decryption routine and do it yourself
|
Advert | |
|
03-07-2007, 09:52 AM | #6 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
If you wait 'til after it's decrypted to grab it, it's not a violation of the DMCA though, right?
|
03-07-2007, 12:15 PM | #7 | |
Fully Converged
Posts: 18,171
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Quote:
|
|
03-07-2007, 01:07 PM | #8 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
Yeah, me neither.
|
03-07-2007, 01:13 PM | #9 |
Übernerd
Posts: 238
Karma: 74
Join Date: Jun 2006
Location: Germany
Device: iRex iLiad
|
www.autoitscript.com (Freeware) or www.autohotkey.com (GPL)
I think that one could throw something together with one of them, at least for the Windows users. |
03-09-2007, 01:58 AM | #10 |
Addict
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
|
It seems Safari are moving to just image tiles ("print fidelity" format), so there is no text to decrypt. So using window/screen grabbing code would be the way to go. However, I doubt that the images would look very good on a Sony reader anyway, unless you ran them through OCR first.
|
03-17-2007, 05:00 PM | #11 | |
Fully Converged
Posts: 18,171
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Quote:
|
|
03-17-2007, 05:20 PM | #12 |
Technogeezer
Posts: 7,233
Karma: 1601464
Join Date: Nov 2006
Location: Virginia, USA
Device: Sony PRS-500
|
By the EULA this is not permitted. As a subscriber you can download 5 chapters a month for your use. Otherwise, "Except as expressly permitted by this EULA, content accessed via the Service may not be stored, reproduced, or transmitted in any form and/or by any means without the express prior written permission of the copyright owner."
Going around the security is against the DMCA. |
03-17-2007, 05:24 PM | #13 | |
Fully Converged
Posts: 18,171
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Quote:
Here is another reason why I think displaying text as image would stink: bandwidth. |
|
03-18-2007, 12:38 AM | #14 |
Member
Posts: 14
Karma: 10
Join Date: Nov 2006
Device: prs-500
|
I hate to post off topic but why don't you try another publisher? I recently found out that apress sells pdfs for 50% of a papercopy price. The pdfs are just password protected and according to the website "Printing, document assembly, content copying or extraction, and content extraction for accessibility are permissible, for personal use only." I dont want to promote them but their EULA seems nice in our DRM infested times. The only problem is that apress did not publish many books.
I did not get books from apress but I got a sample chapter. It is possible to format their pdfs nicely for a reader. |
01-08-2008, 08:23 PM | #15 |
Member
Posts: 24
Karma: 10
Join Date: Jan 2008
Device: Tablet PC
|
I wrote a script like this to play around. Unfortunately I lost it accidentally.
As pointed in another comments, the javascript for Safari Online is pretty obfuscated and the communications to the server are "encrypted". Breaking this system seems a lot of work. However, by running your script directly in the browser, you can work around this protection very easily. Greasemonkey, a useful Firefox extension, lets you do just that. Here are the basics, if anyone has the patience to rewrite it: -it is a Greasemonkey script. That means it is javascript which runs in the browser, for each page of a selected domain. -the script would add a "save" button to the TOC page on Safari Online. -when you click the "save" button, the script goes into saving mode and starts turning pages -the script detects when a page is loaded by polling the status of the "loading" spinner icon or some other event (I don't remember for sure) -for each page loaded while in saving mode, the script finds the proper DOM elements for the content (not the navbar) and cleanses the elements (href, img tags) and grabs the HTML (innerHTML) -the HTML for each page is saved to an HTTP server to a simple service (which needs to be written for this purpose). This service saves the HTML to files. -All the files are written to a folder (bookID) on the server and can be copied for later use. -My toy script did not save images. As someone mentioned, using such a script is probably against the EULA. Also, it appears that Safari Online has some defense mechanism whereas you get logged out if you make too many requests in too short an amount of time. Last edited by dumky; 01-09-2008 at 04:06 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Safari Books Online downloads | nobylspoon | 2 | 09-19-2019 04:58 AM | |
Safari Online Books Forum? | pwjone1 | Feedback | 0 | 04-18-2009 05:48 PM |
Safari Books Online | Bryan Larsen | Which one should I buy? | 2 | 10-17-2008 09:36 AM |
Safari Books Online | markiehill | Sony Reader | 5 | 08-19-2008 07:01 PM |
minimo and Safari Books Online ? | ppxnouse | iRex | 9 | 05-31-2008 11:27 AM |