feat(ba): track Blue Archive from its own wiki
New bawiki parser plus the ba-bawiki-events source, giving the game its two live and upcoming events at day precision. It reads the rendered /wiki/Events page, which is the opposite call to the Fandom source next door and for the same kind of reason: bluearchive.wiki is Miraheze, whose robots.txt disallows /w/ and /*?action=, so there the API is the closed route and the page is the surface * is allowed. It serves our own User-Agent a 200, sets no Content-Signal and no Crawl-delay for us. The Fandom wiki was declined earlier as a JP archive yielding nothing live; this is the live source that assessment pointed at. Three page facts shape the parser, each a way to publish a confidently wrong date. The schedule is a JP/Global tabber and the Japanese version runs four to nine months ahead, so only Global is published — the akwiki hazard. The Global tab's nav button carries the id tabber-Global_version-label and precedes both panels, so slicing from the first matching id reads the Japanese schedule while believing it read ours; the first version of this parser did exactly that and published a JP-only event. And three tabs on the page are named Global, the schedule plus Mini-Event and Joint Firing Drill, so the schedule is found by its Name (EN) header rather than by position, with canParse asserting the same lookup — a renamed tab or column fails the run instead of emptying the lane. The page states no time of day and no timezone anywhere, which is why the dates are day precision and why ba gets no resetOffsets. It also settles the five other schedule tables, which do carry a wall clock but name no zone and mostly do not say which server: reading those as UTC would invent the fact that matters most, and rounding to a day would not save it, because a 04:00 local boundary falls either side of UTC midnight depending on the offset assumed and the start's day is part of the event ID. They are left unparsed deliberately. The two-event count is asserted against an independent extraction off the fixture, and both starts corroborate against the per-event infoboxes elsewhere on the page — GL 2026-08-04 and GL 2026-09-01, where the JP reruns those tabs would have given are 2026-04-01 and 2026-05-06. Three comment counts were already stale before this and are corrected to what the tree now holds rather than to what it held yesterday. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
77921e88f5
commit
d843c7cae7
@@ -52,6 +52,7 @@ Consequences worth internalising:
|
||||
| `wikigg` | wiki.gg MediaWiki `mp-event` templates | Endfield |
|
||||
| `akwiki` | arknights.wiki.gg's `mrfz-wtable` "Ongoing/upcoming" table | Arknights |
|
||||
| `fandom` | Fandom wikis via the MediaWiki `action=parse` API — `Event \| Time Period \| Version` wikitables | Reverse: 1999 |
|
||||
| `bawiki` | bluearchive.wiki's rendered `/wiki/Events` — a JP/Global tabber over `Name (EN) \| Start date \| End date \| Notes` wikitables | Blue Archive |
|
||||
|
||||
`wikigg` is the better shape by a distance: it emits ISO timestamps with one timer per server
|
||||
region, so its events carry exact precision and real `regionEnds`. Prefer a source like that over a
|
||||
@@ -73,6 +74,21 @@ rather than parse to zero events. Two page facts drive the rest of it:
|
||||
anchor on. Inclusion is therefore decided against `ctx.now`, the one parser here that does so;
|
||||
`akwiki` and `game8` can gate on a heading instead, and should where one exists.
|
||||
|
||||
`bawiki` is the mirror image of `fandom`: same MediaWiki software, opposite conclusion about which
|
||||
surface to read. bluearchive.wiki is Miraheze, whose `robots.txt` disallows `/w/` and `/*?action=`,
|
||||
so the API is closed and the rendered `/wiki/Events` page is what `*` is allowed — and it serves our
|
||||
own `User-Agent` a `200`. Three page facts drive the parser (all three in AGENTS.md § Blue Archive):
|
||||
|
||||
- **JP and Global are separate tabs, months apart**, so only Global is published — the `akwiki`
|
||||
hazard. The Global tab's nav *button* precedes both panels, so slicing from the first matching id
|
||||
reads the Japanese schedule.
|
||||
- **Three tabs are named Global**, the schedule plus Mini-Event and Joint Firing Drill. The schedule
|
||||
is identified by its `Name (EN)` header rather than by position, and `canParse` runs the same
|
||||
lookup so a rename fails the run rather than emptying the lane.
|
||||
- **Nothing on the page states a time of day or a timezone.** The schedule's bare ISO dates are day
|
||||
precision; the five tables that do carry a wall clock name no zone for it and are left unparsed
|
||||
rather than read as UTC.
|
||||
|
||||
`akwiki` shares a host family with `wikigg` and nothing else — arknights.wiki.gg has no `mp-event`
|
||||
cards, so the two are separate modules rather than one parser with a branch. Two things about that
|
||||
page shape are worth knowing before touching it:
|
||||
|
||||
Reference in New Issue
Block a user