PDF downloader for Pearson's ActiveLearn textbooks
Requirements
- Python 3.6+
ocrmypdf
img2pdf
pdftk
wget
- Some form of bash
- My Python script
Instructions
(Credit to u/flanter21 for his guide on getting the required URL)
-
Log into ActiveLearn.
-
Open the book you want to convert.
-
Navigate to the last page of the book.
-
Right-click on the last page of the book.
-
Click inspect.
<div style="position:absolute;top:0;bottom:0;left:0;right:0;background-color:rgba(0,0,0,0);"></div>
should be what is highlighted.
-
Press the up arrow once on the keyboard to select the iframe.
-
Look for the URL in the iframe element.
-
Double-click the URL to highlight it and press Ctrl+C to copy it.
-
Paste the URL in the address bar of a new tab.
-
Right-click the image that appears and click open in new tab.
-
Copy the URL of that page.
It should end with a hyphen and then 3 numbers and then
.jpg
(e.g.-408.jpg
) -
Run
python3 downloader.py
and fill in the prompts it gives you (for advanced users, it usesclick
so you can look at the help for CLI options) -
Wait for it to complete, you should now have a
book.pdf
in the current directory.
Some warnings
- I cannot guarantee you won't be blocked from ActiveLearn for running this tool; however I was not
- Ensure you do not run this in a directory containing a
book
folder as all its contents will be deleted (if you use-o
this changes to whatever you supplied) - I cannot guarantee that the OCR will be perfect as it isn't my library