fix: send a user agent when gamemap.py downloads #7

Merged
ryan.mcgee merged 1 commit from fix/gamemap-user-agent into main 2026-11-19 03:51:15 +00:00
Owner

Summary

  • Fix gamemap.py failing with HTTP Error 403 when it fetches the live /items-index.json.

Cause

  • Cloudflare in front of the site rejects Python's default Python-urllib User-Agent (error 1010). curl and browsers are fine. Found by running the freshly deployed tool the way a player would, without --index.

Changes

  • static/tools/gamemap.py: one download() helper sends a descriptive User-Agent and turns any network failure into a one-line error that suggests --index FILE. Used for both the retoc download and the item index.

Verification

  • Before: curl -A Python-urllib/3.13 -> 403, curl -A rsdclog-gamemap/1 -> 200
  • After: py_compile OK; full run in a clean python:3.13-slim container with no --index fetched the live index and mapped 1353 items and 37 quests (build 26670300); with networking off it prints error: couldn't download ... For the item index you can pass --index FILE. and no traceback
## Summary - Fix `gamemap.py` failing with `HTTP Error 403` when it fetches the live `/items-index.json`. ## Cause - Cloudflare in front of the site rejects Python's default `Python-urllib` User-Agent (error 1010). `curl` and browsers are fine. Found by running the freshly deployed tool the way a player would, without `--index`. ## Changes - `static/tools/gamemap.py`: one `download()` helper sends a descriptive User-Agent and turns any network failure into a one-line error that suggests `--index FILE`. Used for both the retoc download and the item index. ## Verification - Before: `curl -A Python-urllib/3.13` -> 403, `curl -A rsdclog-gamemap/1` -> 200 - After: `py_compile` OK; full run in a clean `python:3.13-slim` container with no `--index` fetched the live index and mapped 1353 items and 37 quests (build 26670300); with networking off it prints `error: couldn't download ... For the item index you can pass --index FILE.` and no traceback
fix: send a user agent when gamemap.py downloads
All checks were successful
deploy / build (pull_request) Successful in 43s
324d5480fe
- Cloudflare returns 403 for Python's default User-Agent, so the tool
  could not fetch the live item index
- share one download helper for retoc and the index, with a clear
  error and an --index hint on network failure
ryan.mcgee deleted branch fix/gamemap-user-agent 2026-11-19 03:51:15 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
UltraVu-Studios/rsdclog!7
No description provided.