Tool for scraping content as PNGs from a CGP book which you can then turn into a PDF. Built with Bun.
- Go on the CGP website and buy a digital book with your account logged in,
- Go to Your Online Products
- Pick a book and click on the + button, then Book
- Wait for the book to load and copy the URL and pop it into the
.env
file asBOOK_URL
Create a .env
file in the root directory with the following content:
EMAIL="[cgp account email]"
PASSWORD="[cgp account password]"
CODE="[the activation code cgp sent you in the email]"
BOOK_URL="[the url of the book you want to scrape]"
- Run
bun install
to install the dependencies - Run
bun start
to start the scraper - The PNGs will be saved in the
screenshots
directory in the current working directory
Disclaimer: This can only be used on purchased books meaning you need to buy the book before using this tool