Code Monkey home page Code Monkey logo

perlego-downloader's Introduction

Perlego EBook Downloader

For personal use only.

College students that have used Perlego before know that downloading EBooks for offline viewing is not easy. This repository contains scripts that help paying users download their EBooks without hassle.

For the most basic use case (Less than ~200 pages):

  1. Open Ebook in a browser (ideally ones available as PDF).
  2. Go to the page you want to start printing.
  3. Open Chrome's developer console via the UI.
  4. Paste the content of PerlegoContent.js into the console and press enter.
  5. Enter printPages(startPage, endPage) into the console, where startPage is the page number you want to start printing on, and endPage is the page number of the page you want to end on.
  6. Wait for the script to finish running, and you should be prompted to save the pdf.

If you want to download an entire textbook, it is recommended that you download the book in sections of around 150 pages to reduce the load on the browser. You could then combine the pdfs together using external tools such as pdfunite.

Please note that PerlegoContent.js does not save the menu(outline) of the pdf, for that you need to use PerlegoOutline.js as described below.

Procedure for downloading an entire textbook with the menu intact:

  1. Download all sections of the Ebook using PerlegoContent.js, make sure you name your pdfs part_1.pdf, part_2.pdf, etc. in the Downloads folder.

  2. Make sure you have poppler-utils installed to combine the pdfs, and fntsample installed to add the outline.

  3. Run PerlegoOutline.js from the "Table of contents" page of the Ebook (between "Book details" and "Related") in developer console.

  4. (optional) You can customise the downloaded outline.txt according to this specification.

  5. In the Downloads folder, open a local terminal and run the following commands:

    # Combine the pdfs into one
    pdfunite part_*.pdf temp.pdf
    
    # Add the outline of the pdf
    pdfoutline temp.pdf outline.txt output.pdf
    
    # Clean up
    rm part_*.pdf temp.pdf outline.txt
    

perlego-downloader's People

Contributors

danieldeng2 avatar

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.