fix(refresh): only 200 is a page, so a 202 challenge names itself
The health check earned its keep on the first run: six sources broken, four cycles each, "last confirmed never" — and a last status of **202**. That is game8.co's edge answering a GitHub runner with a bot-management body instead of the wiki. `response.ok` admitted it. A 202 therefore passed the status gate as a document, reached the parser, yielded nothing, and was reported as "kept previous snapshot; new body yielded 0 events" — an accurate description of the symptom that never mentioned the status explaining it, which is why this looked like a parser problem for days. Require 200: 202 means the request was accepted for processing, 204 has no body, 206 is a fragment, and none of them is a page. The rejection note already names the Server header, so the next cycle reads `HTTP 202 (AkamaiGHost)` instead. Recorded in CLAUDE.md § Scraping conduct, including that this must not be worked around. The per-host spacing added alongside does not help and was never going to — a 202 on a cycle's first request is address reputation, not rate. Browser -shaped headers or a residential egress would be defeating an access control, which is the ground uma.moe was declined on, and game8's robots.txt is permissive, which makes doing it there worse rather than better. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
988f72a56f
commit
54052d50c4
@@ -177,6 +177,11 @@ section but must never claim the event title.
|
||||
permission we have. A 404 means no restrictions.
|
||||
- 20s timeout. **No retries**: a retry is a second request, and CLAUDE.md § Scraping conduct says
|
||||
one per source per cycle. A failed source waits for the next cycle instead.
|
||||
- **Only `200` is a page** (plus `304` for "unchanged"). Not `response.ok` — that admits the whole
|
||||
2xx range, and `202 Accepted` is what an edge bot-manager answers with while it serves a challenge
|
||||
instead of the wiki. Admitting it fed that challenge page to the parser, which reported "yielded 0
|
||||
events" — the symptom, with the status that explained it unmentioned. `204` has no body and `206`
|
||||
is a fragment; none of them is a document.
|
||||
- **Space requests to a host we have already asked this cycle** — the host's `Crawl-delay` if it
|
||||
states one, else `DEFAULT_HOST_GAP_MS` (2s). The wait is taken after the interval and robots gates,
|
||||
so a source we then skip costs nothing.
|
||||
|
||||
Reference in New Issue
Block a user