A high-quality book downloader for digi4school.at that preserves vector graphics and generates compact PDF files.
This script is intended for educational purposes only. It was created to demonstrate web scraping techniques with Playwright on a modern web application.
The content downloaded by this script (i.e., the books from digi4school.at) is copyrighted. Downloading and distributing this material may violate the website's Terms of Service and copyright law.
Use this script at your own risk:
- You are solely responsible for your actions and for complying with all applicable laws and the website's terms.
- Automated scraping may lead to your account being restricted or banned by the service provider.
- The author of this script is not responsible for any misuse or any damages resulting from its use.
Downloads digital books from digi4school.at by:
- Logging into the platform automatically
- Finding and opening the specified book(s)
- Extracting each page as SVG (vector graphics)
- Inlining all assets (images) for offline viewing
- Generating a combined PDF file
- Vector-based output: Maintains crisp, scalable graphics
- Stealth browsing: Anti-detection to avoid bot blocking
- Multiple books: Download single books, lists, or all available
- Automatic pagination: Handles multi-page books seamlessly
- Compact files: 45MB for 356 pages vs 1GB for rasterized images
digi4school.at has bot detection that returns HTTP 450 errors during login if it detects automated behavior. This tool uses:
puppeteer-extra-plugin-stealthto mask automation signatures- Persistent browser profiles to maintain session state
- Natural timing patterns to mimic human behavior
- Real Chrome browser instead of headless automation
Without these measures, the platform blocks automated access attempts.
- Bun runtime
- Google Chrome browser
- digi4school.at account
- Clone and install:
git clone https://github.com/jonasfroeller/digi-downloader.git
cd digi-downloader
ni- Create
.envfile:
EMAIL=your.email@example.com
PASSWORD=your_password
BOOK_TITLE=Your Book TitleBook Selection via BOOK_TITLE in .env:
- Single title:
BOOK_TITLE=My Book - Multiple titles:
BOOK_TITLE=Book A;Book B - JSON array:
BOOK_TITLE=["Book A","Book B"] - All books:
BOOK_TITLE=null(downloads everything not yet in./books)
Optional settings:
CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe
CHROME_PROFILE=C:\Users\YourUser\AppData\Local\digi4school-profilebun run download.tsOutput structure:
books/
└── Your Book Title/
├── 0001.svg
├── 0002.svg
├── ...
└── Your Book Title.pdf
This project is licensed under the CC BY-NC-SA 4.0 License. See the LICENSE file for details.
Use responsibly and in accordance with digi4school.at Terms of Service and applicable copyright laws.
Note: Browser stays open for manual verification. Press Ctrl+C to quit.