Arknights API Integration#
RSSHub exposes four RSS routes for Arknights (明日方舟) content, all under the /hypergryph/arknights/ path namespace. These were migrated from the legacy /arknights/ namespace into lib/routes/hypergryph/ to consolidate all Hypergryph game routes under the parent-company namespace.
Route Overview#
| Route | Path | Source |
|---|---|---|
| In-game announcements | /hypergryph/arknights/announce/:platform?/:group? | ak-conf.hypergryph.com config CDN |
| Website news | /hypergryph/arknights/news/:group? | ak.hypergryph.com/news (SSR page) |
| Japan server news | /hypergryph/arknights/japan | arknights.jp:10014/news REST API |
| Creator journal (回归线) | /hypergryph/arknights/arktca | aneot.arktca.com (scraping) |
In-Game Announcements (announce.ts)#
Source file: lib/routes/hypergryph/arknights/announce.ts
The route fetches a JSON metadata manifest from the Hypergryph config CDN :
https://ak-conf.hypergryph.com/config/prod/announce_meta/{platform}/announcement.meta.json
Supported platforms: Android (default), IOS, Bilibili .
The manifest returns an announceList array . Each entry contains announceId, title, isWebUrl, webUrl, day, month, and group fields. Groups can be filtered by ALL (default), SYSTEM, or ACTIVITY .
For each announcement, the handler fetches the linked webUrl page and extracts content using Cheerio, trying selectors in priority order: .content → .banner-image-container.cover → 'No Description' . Internal uniwebview:// deep-link hrefs are rewritten to href="#" to prevent broken links .
Date handling caveat: The year is unknown from the manifest; pubDate is parsed from month-day only, discarding the year .
Both the metadata fetch and each per-announcement page fetch are cached using RSSHub's cache.tryGet with config.cache.routeExpire .
Website News (news.ts)#
Source file: lib/routes/hypergryph/arknights/news.ts
This route scrapes the https://ak.hypergryph.com/news Next.js SSR page rather than calling a dedicated API . The data is embedded in the page as a __next_f.push(...) script block; the handler extracts and parses it with a regex to obtain initialData .
initialData is structured with four top-level keys: LATEST, ANNOUNCEMENT, ACTIVITY, NEWS . The group route parameter controls which subset is returned; ALL flattens all four lists .
Each NewsItem carries cid, tab, title, author, displayTime (Unix timestamp), cover, and brief . Individual article pages at https://ak.hypergryph.com/news/{cid} are fetched for full content using a deep CSS selector .
Fragility note: Content extraction relies on a Next.js internal serialization format (self.__next_f.push) and a hard-coded deep CSS path. Both are susceptible to breakage on Next.js version upgrades or page restructuring.
Japan Server News (japan.ts)#
Source file: lib/routes/hypergryph/arknights/japan.ts
Fetches from a REST API endpoint on a non-standard port: https://www.arknights.jp:10014/news . This is an independent API for the Japanese server and is not shared with the CN routes.
Creator Journal — 回归线 (arktca.ts)#
Source file: lib/routes/hypergryph/arknights/arktca.ts
Scrapes https://aneot.arktca.com for the fan/creator association journal. The route was previously called "期刊" and renamed to "回归线" after a website update changed the URL structure .
Namespace & Directory Layout#
The parent namespace is defined in lib/routes/hypergryph/namespace.ts with url: 'www.hypergryph.com' and categories: ['game']. The Arknights routes share this namespace alongside Endfield routes (lib/routes/hypergryph/endfield/), which use a separate news API at web-news.hypergryph.com/api/bulletin.
Deprecated Endpoints#
- Old
/arknights/namespace — The previouslib/routes/arknights/directory (announce, news, japan) was removed and consolidated underlib/routes/hypergryph/arknights/in 2024. arktcaURL — The route's upstream URL changed after the website was restructured; the fix (appending a trailing slash) was merged in PR #19897 .news.tsNext.js parsing — The serializedinitialDataextraction path is inherently fragile; any Next.js upgrade onak.hypergryph.commay break parsing at lines 84–90.