- Python 95.9%
- HTML 4.1%
| templates | ||
| .gitignore | ||
| AGENTS.md | ||
| backup.py | ||
| get.py | ||
| LICENSE | ||
| parse.py | ||
| README.md | ||
| requirements.txt | ||
| test_backup.py | ||
goodreads-backup
Download a fresh Goodreads library CSV using Requests and lxml. No browser or Playwright installation is needed.
Install dependencies with python3 -m pip install -r requirements.txt, or on
Debian with sudo apt install python3-requests python3-lxml.
Configure ~/.config/goodreads/config (or $XDG_CONFIG_HOME/goodreads/config):
[login]
email = your-email@example.com
password = your-password
[backup]
dir = /path/to/existing/backup/directory
Run ./backup.py. It requests a fresh export, polls for completion for up to
15 minutes, validates the CSV header and atomically writes
YYYY-MM-DD_goodreads_library_export.csv in the configured directory.
Read requests retry transient failures up to three times, with a 60-second
timeout per request. Login and export POSTs are never automatically repeated.
An unchanged old export is not treated as a successful fresh backup.
The existing Playwright auth.json is read automatically; there is no manual
cookie conversion. Refreshed cookies are saved privately in the same format.
./backup.py --check-login checks the saved session without logging in, exporting,
or changing auth.json. ./backup.py --login-only refreshes authentication without
exporting. If the saved session has expired, the script submits the email/password
login form with its hidden fields. CAPTCHA, MFA or an unsupported login flow
cause a clear error; refresh auth.json from a signed-in browser session if needed.
The old --no-headless and --har-path options have been removed.
Use chronic (from moreutils) before the backup command in cron to suppress
output on success and receive mail on failure. Failures exit nonzero and print
a short error message. Add --debug when running manually for a full traceback.
Run regression checks with python3 -m unittest -v.