Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lockieluke/cgp-book-scraper
Tool for scraping content as PNGs from a CGP book which can be turned into a PDF
https://github.com/lockieluke/cgp-book-scraper
Last synced: 14 days ago
JSON representation
Tool for scraping content as PNGs from a CGP book which can be turned into a PDF
- Host: GitHub
- URL: https://github.com/lockieluke/cgp-book-scraper
- Owner: lockieluke
- Created: 2024-04-24T22:17:31.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-24T22:17:39.000Z (8 months ago)
- Last Synced: 2024-04-24T23:27:04.776Z (8 months ago)
- Language: TypeScript
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CGP Book Scraper
Tool for scraping content as PNGs from a [CGP](https://www.cgpbooks.co.uk) book which you can then turn into a PDF. Built with [Bun](https://bun.sh/).
## Preparation
1. Go on the CGP website and buy a **digital** book with your account logged in,
2. Go to [Your Online Products](https://www.cgpbooks.co.uk/bookspacedemo)
3. Pick a book and click on the **+** button, then **Book**
4. Wait for the book to load and copy the URL and pop it into the `.env` file as `BOOK_URL`# Configuration
Create a `.env` file in the root directory with the following content:
```.dotenv
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]"
```## Usage
1. Run `bun install` to install the dependencies
2. Run `bun start` to start the scraper
3. The PNGs will be saved in the `screenshots` directory in the current working directoryDisclaimer: This can only be used on purchased books meaning you need to buy the book before using this tool