Download borrow one hour book from archive org | download borrowed books from archive.org reddit | Download Archive.org Borrowed Books
Download Archive.org Borrowed Books For Free
In this page, I’m going to share some simple steps to Download Archive.org Borrowed Books For Free. You may have noticed that some books are not free to download from Archive.org site and they just give option to borrow books for 1 hour and 14 day.
And even some books can be borrowed for only 1 hour.
So I thought why not make some script to download these books as pdf file. For this tutorial I’m using Chrome Browser. I haven’t checked if this trick work on Firefox or any other browser.
Download Archive.org Borrowed Books – Step 1
First login to you account and borrow the book.
For example I am using this book.
It can be borrowed either for one hour or 14 days.
I borrowed this for 14 days. It really doesn’t matter for how much time you’re borrowing it.
Download Archive.org Borrowed Books – Step 2
Flip from first to the last page, page by page, make sure all pages are displayed.
Archive.org preview loads book in images format. So we will get all images and combine them and then convert them to pdf using jsPDF.
Here comes the hard step.
Download Archive.org Borrowed Books – Step 3
On the last page, Right click on the book page and and click inspect. Now you can see Image src in the source code.
Double click the src and copy the link. It will be something like this.
https://ia903201.us.archive.org/BookReader/BookReaderImages.php?zip=/32/items/gendertribewomen0000kelk/gendertribewomen0000kelk_jp2.zip&file=gendertribewomen0000kelk_jp2/gendertribewomen0000kelk_0199.jp2&id=gendertribewomen0000kelk&scale=4&rotate=0
You have to check image number / page number inside the url.
In the above url image number is 0199.jpg2.
gendertribewomen0000kelk_0199.jp2
Now real trick starts here.
You have to loop from 0001.jp2 to 0199.jpg to get all images source url. You can use any programming language to loop like – Javascript or PHP etc.
For this example I’m using PHP for loop.
I know you may not have Installed php or WAMP or XAMPP server on you PC.
But you can use online php editor. I am using W3School PHP editor.
Open PHP Editor and Paste This code. Click here to get code file.
Don’t get scared with the code. This is just a simple php for loop. And remember to replace the URL with your URL and 199 with your page number.
Now run the script.
You will get result will be something like this.
Now inspect again Archive.org page, this time remove whole body tag. And paste above code (result from w3schools) inside body tag.
Now you can see all images are loaded in the browser.
That’s all. Now we have to get this images in pdf format. For that purpose we will use jsPDF. Follow along.
Download Archive.org Borrowed Books – Step 4
In this step we are going to install a chrome extension. This is called Cross Domain – CORS.
This will be used to handle Cross Domain Issues. Install this plugin from this link – https://chrome.google.com/webstore/detail/cross-domain-cors/mjhpgnbimicffchbodmgfnemoghjakai
Now enable it.
All done, let’s go to final step.
Download Archive.org Borrowed Books – Step 5
This is final step. You’ve done better.
Open console on Archive.org page. Now copy and paste this code. Click here to get code.
After a few seconds you file will be downloaded as ‘download.pdf‘ .
That’s all.
I hope you will like it. I really don’t share this kind of things on this blog.
I was stuck once and wasted my entire day to figure out. I finally solved it.
So, I thought to share this knowledge with everyone. So they will not waste their time.
Thanks! for visiting GKPAD by YadavG. Jai Hind!