« Legalize Dope, Annex Mexico | HomePage | Dozier Spam Bot Attacks tdaxp? »

Thursday, January 31, 20081201799376

HOWTO: Batch Download a Book in PDF Pages from NetLibrary

NetLibrary is an online book resources that universities or other individuals pay to supply them with virtual copies of books. These books are available online, and can be searched, downloaded, and saved. The catch is that NetLibrary's interface limits you to viewing (in horribly slow Acrobat reader) one page at a time. Given how unresponsive Acrobat makes many computers, this can make printing out a long book take hours.

Therefore, I took the effort to figure out how to batch download a book from NetLibrary, saving me valuable time.

My solution uses a combination of Firefox and Perl, but other solutions are of course available.

After I loaded up the first true page of the book in the NetLibrary interface, I gave the frame with the PDF its own Window used Firefox's Tools | Page Info | Media properties dialog box to determine the URL of the embedded PDF file. It turns out it's a call to a program named nlReader.dll, but it takes a book identification number and page number as arguments:

http://0-www.netlibrary.com.library.unl.edu/nlreader/nlReader.dll?BookID=BOOKIDGOESHERE&FileName=FILENAMEGOESHERE

Obviously, the library.unl.edu part requires my university proxy. For normal pages, the filename was in the format of Page_1.pdf, Page_2.pdf, etc. So I wrote a perlscript to create hyperlinks to pages 1 to 499, saved the output to HTML, used the DownloadThemAll! Firefox extention to get them, and...

Then Acrobat crashed trying to print out those hundreds of PDFs. Boo! Fortunately, Perl came to my rescue... I used ppm to install the module Perl::Reuse, then wrote a script to append all those pdfs into one. The final product is about 500 pages ans 70 megs, but quite easy to store, print out, etc.

Thanks, NetLibrary!

Comments

Sounds like a mighty fine pe(a)rl ye found, matey. You have a promising career as a pirate ahead of you (so long as you can sail the seven seas aboard a .edu proxy).

How many titles are available? Just scholarly stuff, or mainstream books too?

Posted by: deichmans | Thursday, January 31, 2008

As I'm merely automating intended use that I pay for, I certainly hope it isn't piracy!

(Now if only I could write a pearl front-end for Blackboard [1] !)

Re: their collection, NetLibrary provides access to 2,740 e-books at Nebraska. The newest titles are :

* Competencies in Organizational E-learning: Concepts and Tools
by Sicilia, Miguel-Angel

* Mail and Internet Surveys: The Tailored Design Method
2Nd Ed., 2007 Update With New Internet, Visual, and Mixed-mode Guide.
by Dillman, Don A.

* Outsourcing Management Information Systems
by Schniederjans, Marc J.; Schniederjans, Ashlyn M.; Schniederjans, Dara

* Agile Virtual Enterprises: Implementation and Management Support
by Cunha, Maria Manuela.; Putnik, Goran

* The AMA Handbook of Project Management 2Nd Ed.
by Dinsmore, Paul C.; Cabanis-Brewin, Jeannette.

And the oldest are:

* Sequoyah
by Foreman, Grant.
Publication: Norman, Okla University of Oklahoma Press, 1938.

* The Branch Will Not Break: Poems
by Wright, James Arlington.
Publication: Middletown, Conn. Wesleyan University Press, 1963.

* The Branch Will Not Break: Poems
by Wright, James Arlington.
Publication: Middletown, Conn. Wesleyan University Press, 1963.

* History of Nineteenth-century Russian Literature. Vol. 2, The Age of Realism
by Chyzhevskyi, Dmytro.
Publication: Nashville, Tenn. Vanderbilt University Press, 1

* Early Modern English
Language Library
by Barber, Charles Laurence.
Publication: Edinburgh Edinburgh University Press, 1976.

The Love Library has Tom's dissertation [1], btw, but sadly not an e-version of it...

[1] http://tdaxp.blogspirit.com/archive/2008/01/15/blackboard-is-awful.html
[2] http://library.unl.edu/search~S0?/aBarnett%2C+Thomas/abarnett+thomas/1%2C2%2C3%2CB/exact&FF=abarnett+thomas+p+m&1%2C2%2C

Posted by: Dan tdaxp | Thursday, January 31, 2008

Well, you wouldn't have to worry about a hard copy if you put it on a PDA or dedicated e-reading device for more convenient viewing.

Posted by: Jeffrey James | Thursday, January 31, 2008

Jeffrey, haha!

I would be too worried with getting ketchup on my Kindle as I read it over a late lunch at Runzas!

Posted by: Dan tdaxp | Thursday, January 31, 2008

About time you typed something useful :) How long has it been since you wrote any code? The Rails Student Boredom Generator?

See you next Saturday.

Posted by: aaron | Friday, February 01, 2008

"How long has it been since you wrote any code? The Rails Student Boredom Generator?"

Aside from some data processing, yup.

Posted by: Dan tdaxp | Friday, February 01, 2008

Post a comment