Skip to main content

·136 words·1 min
Table of Contents

Library Checkout Scraper #

This tool logs into the Stadtbücherei Augsburg LMSCloud OPAC and exports your currently checked-out books to a JSON file.

Setup #

  1. Clone the repository (or copy the files).

  2. Install dependencies:

pip install -r requirements.txt
  1. Create a .env file in the same folder with your library credentials:
LIBRARY_USERNAME=your_library_card_number
LIBRARY_PASSWORD=your_pin_or_password
  1. Download ChromeDriver (or GeckoDriver for Firefox) and ensure it’s in your PATH:

Usage #

Run the scraper:

python library_scraper.py

After running, your checked-out books will be saved in checkouts.json:

[
  {
    "title": "Chaos in der Schule [3]",
    "author": "Rylance, Ulrike",
    "due_date": "2025-11-21"
  }
]

Notes #

  • The script runs headless (no visible browser) by default. Remove --headless in library_scraper.py to debug visually.
  • The scraper uses class-based selectors to reliably extract titles, authors, and due dates.
  • Only JSON output is generated; CSV is not used.