- Python 100%
The Range-based resume path assumed a 206 response, but some servers respond 200 with the full body instead of honoring Range. Appending that to the existing partial file silently corrupted it. Now falls back to a full re-download from scratch when the response isn't 206, and closes the response on a 416 instead of leaking the connection. |
||
|---|---|---|
| gog_downloader | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
gog-downloader
A small CLI that logs in to your GOG.com account and downloads games you own.
It uses the same login flow as GOG Galaxy (OAuth2 against auth.gog.com), then
walks your library via embed.gog.com / api.gog.com to fetch installers
(and optionally DLC and bonus content).
Install
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
This installs the gog-dl command.
Usage
1. Log in (opens your browser, then asks you to paste the redirect URL back):
gog-dl login
Your tokens are saved to ~/.config/gog-downloader/tokens.json (readable only
by you) and refreshed automatically on later runs.
2. See what you own:
gog-dl list
3. Download:
# Everything, Windows installers only (the default)
gog-dl download --all
# Just a couple of games
gog-dl download --game "Witcher" --game "Stardew"
# Include DLC and bonus content (soundtracks, artbooks, ...)
gog-dl download --all --dlc --bonus
# Multiple OS builds
gog-dl download --all --os windows,linux,mac
# Preview without downloading anything
gog-dl download --all --dry-run
# Custom destination (default: ./gog-downloads)
gog-dl download --all --output /Volumes/Backup/gog
# Throttle to 10 MB/s
gog-dl download --all --rate-limit 10M
# Re-download everything even if already present on disk
gog-dl download --all --force
Downloads are idempotent by default: files already present on disk with the
expected size are skipped, and interrupted downloads resume automatically
(falling back to a full re-download if the server doesn't support range
requests, rather than corrupting the partial file). Pass --force to
re-download regardless. Where GOG provides a checksum, it's verified after
download and a warning is printed on mismatch.
Notes
- This only accesses games tied to your own GOG account via your own login session - there's no bypass of any access control, DRM, or paywall involved.
- GOG doesn't publish a formal third-party API, so these endpoints are the same ones GOG Galaxy itself uses; they could change without notice.