A new version of a humblebundle batch downloader
  • Python 83.4%
  • HTML 6.4%
  • JavaScript 4.5%
  • CSS 4.2%
  • Dockerfile 0.9%
  • Other 0.6%
Find a file
masterdot.ai da9da742fd Doku: flakigen CI-Teardown und die Log-Eigenheiten der Forge festgehalten
T25 in TASKS.md, Bugfix-Eintrag im CHANGELOG und der Nachtrag am
M23-Protokolleintrag in beiden Konzept-Dokumenten: Lauf 166 meldete '167
passed, 1 error' (Teardown-TimeoutError, close_timeout 10 s gegen 5 s
Budget), Lauf 168/169 ist nach dem Fix gruen.

Dazu die Beobachtung, die beim Suchen des Logs Zeit gekostet hat: unter
/data/gitea/actions_log/<owner>/<repo>/ liegen Hex-Unterordner nach Task-ID
(a6 = 166), und zu gruenen Aufgaben existiert ueberhaupt keine Logdatei --
fuer einen gruenen Lauf sind Job-Status und Registry-Artefakte die Belege.

Dieser Commit ist reine Doku und soll daher vom neuen paths-ignore
uebersprungen werden -- gleichzeitig der Test dafuer.
2026-10-16 14:57:32 +02:00
.forgejo/workflows Doku: M22/M23 nachgezogen, TASKS.md und CLAUDE.md angelegt, v0.2.0 2026-10-16 14:40:30 +02:00
.github/workflows CI: Forgejo-Actions-Workflow -- Testsuite bei jedem Push, web-Image auf main 2026-10-16 14:15:51 +02:00
docker M19: HTTPS standardmaessig -- behebt VNC-Clipboard-Autopaste auf Unraid 2026-08-23 19:13:40 +02:00
src/hbdl M22: Fortschrittsbalken fuer sync --verify-only, adopt und Katalog-Discovery 2026-08-25 18:23:47 +02:00
tests Fix: flakiger Teardown in test_vnc_proxy liess CI-Job scheitern 2026-10-16 14:45:42 +02:00
.dockerignore M13: Docker-VNC-Login, M12: Pause/Stop, sonstige verbleibende Web-/Docker-Infrastruktur 2026-08-19 00:02:39 +02:00
.gitignore M22: Fortschrittsbalken fuer sync --verify-only, adopt und Katalog-Discovery 2026-08-25 18:23:47 +02:00
CHANGELOG.md Doku: flakigen CI-Teardown und die Log-Eigenheiten der Forge festgehalten 2026-10-16 14:57:32 +02:00
CLAUDE.md Doku: M22/M23 nachgezogen, TASKS.md und CLAUDE.md angelegt, v0.2.0 2026-10-16 14:40:30 +02:00
CONCEPT.de.md Doku: CONCEPT.md auf Englisch, CONCEPT.de.md als deutsches Original (M14) 2026-08-18 23:50:49 +02:00
CONCEPT.md M21: adopt-Diagnostik -- "es migriert nichts und ich kann nicht nachvollziehen warum" 2026-08-24 19:50:23 +02:00
CONCEPT_WEB.de.md Doku: flakigen CI-Teardown und die Log-Eigenheiten der Forge festgehalten 2026-10-16 14:57:32 +02:00
CONCEPT_WEB.md Doku: flakigen CI-Teardown und die Log-Eigenheiten der Forge festgehalten 2026-10-16 14:57:32 +02:00
docker-compose.override.yml M21: adopt-Diagnostik -- "es migriert nichts und ich kann nicht nachvollziehen warum" 2026-08-24 19:50:23 +02:00
docker-compose.yml M13: Docker-VNC-Login, M12: Pause/Stop, sonstige verbleibende Web-/Docker-Infrastruktur 2026-08-19 00:02:39 +02:00
LICENSE Add LICENSE, CHANGELOG, and README polish 2026-08-15 19:41:16 +02:00
pyproject.toml Doku: M22/M23 nachgezogen, TASKS.md und CLAUDE.md angelegt, v0.2.0 2026-10-16 14:40:30 +02:00
README.de.md Doku: README.de.md ergaenzt, Cross-Link-Header (M14) 2026-08-18 23:49:30 +02:00
README.md Doku: README.de.md ergaenzt, Cross-Link-Header (M14) 2026-08-18 23:49:30 +02:00
TASKS.md Doku: flakigen CI-Teardown und die Log-Eigenheiten der Forge festgehalten 2026-10-16 14:57:32 +02:00

English | Deutsch

HumbleBundleDownloaderNG

A new version of a humblebundle batch downloader.

See CONCEPT.md for the full design (architecture, data model, milestones) and CHANGELOG.md for what's been built and fixed so far. This README covers day-to-day usage of what's implemented.

This is an independent implementation, not a fork, but builds on ideas from earlier Humble Bundle downloaders in the same space:

Status

Implemented:

  • M1 — auth & discovery (read-only): hbdl auth login, hbdl auth check, hbdl list.
  • M2 — direct download queue: hbdl sync downloads every file via resumable, hash-verified HTTP downloads, tracked in a local SQLite manifest so reruns skip already-verified files.
  • M3 — robustness hardening: a circuit breaker aborts the whole run after repeated 403/429 responses instead of quietly hammering a throttled/expired account, and hbdl sync --verify-only re-hashes already-downloaded files against the manifest without any network downloads.
  • M4 — BitTorrent v1: --strategy {auto,direct,torrent}. auto/torrent save the .torrent file next to where the download would go whenever one is available (open it yourself in your torrent client of choice) and fall back to a direct download otherwise; direct always ignores the torrent option. Downloading the actual content via BitTorrent (client handoff or an embedded engine) is intentionally out of scope for v1 — see CONCEPT.md section 7 for the later, optional stages.

All milestones from CONCEPT.md are now implemented and have been exercised against a real account (92 orders, ~2700 files). That run surfaced and fixed two real bugs around stale API metadata on older bundles — see CHANGELOG.md for details.

Setup

uv venv .venv
uv pip install -e ".[dev]" --python .venv/bin/python
.venv/bin/playwright install chromium   # one-time, needed for `auth login`

Usage

Log in once (opens a real browser window — you complete the login, including any captcha/2FA, yourself; hbdl only reads out the resulting session cookie afterwards):

hbdl auth login

Verify the session works:

hbdl auth check

List everything in your library (dry run, no downloads):

hbdl list
hbdl list --format json > library.json

If you're on a headless machine without a display, skip auth login and pass a cookie directly instead (see CONCEPT.md section 2 for the Netscape cookies.txt format):

hbdl list --cookie-file cookies.txt
hbdl list --cookie "$HBDL_COOKIE"

Download everything:

hbdl sync --dest ~/HumbleLibrary

Re-running hbdl sync is safe and cheap — already-downloaded, hash-verified files are skipped (tracked in a local SQLite manifest, not by trusting the filesystem alone). Filter by platform, or preview without writing anything:

hbdl sync --platform windows,ebook
hbdl sync --dry-run

Re-check integrity of what's already on disk without downloading anything:

hbdl sync --verify-only

Prefer BitTorrent where available (v1: saves the .torrent file for files that have one, downloads the rest directly), or force one mode explicitly:

hbdl sync --strategy auto      # default
hbdl sync --strategy direct    # always HTTP, ignore torrent options
hbdl sync --strategy torrent   # save .torrent where available, direct fallback otherwise

Development

.venv/bin/python -m pytest

Tests run entirely offline against recorded/sanitized fixture JSON in tests/fixtures/ — no live Humble Bundle account is required.

License

MIT.