Revert "fix(zim): use the OPDS catalog host, not Kiwix's gated browse host"

This reverts commit 9ed3ac6a46.
This commit is contained in:
Jake Turner 2026-09-02 08:58:45 -07:00 committed by jakeaturner
parent 93be5671bf
commit d1b96962ac
No known key found for this signature in database
GPG Key ID: B1072EBDEECE328D
2 changed files with 2 additions and 12 deletions

View File

@ -24,14 +24,7 @@ import { isRawListRemoteZimFilesResponse } from '../../util/zim.js'
* defensive — a malformed entry is skipped, never thrown.
*/
// `browse.library.kiwix.org` is Kiwix's *human* browsing host. On 2026-08-29 it grew an
// anti-crawler interstitial that answers HTTP 200 with an HTML "Please confirm..." page
// requiring JS + a cookie, so every catalog request here returned unparseable HTML.
// `parseZimEntries` swallows that as an empty feed, which reads as "no updates available"
// -- a silent, permanent stall of ZIM auto-update. `opds.library.kiwix.org` is the
// machine-facing host for the same API and is not gated; `library.kiwix.org` now 301s to
// it. Keep catalog traffic off the browse host.
const KIWIX_CATALOG_URL = 'https://opds.library.kiwix.org/catalog/v2/entries'
const KIWIX_CATALOG_URL = 'https://browse.library.kiwix.org/catalog/v2/entries'
const GITHUB_PMTILES_URL =
'https://api.github.com/repos/Crosstalk-Solutions/project-nomad-maps/contents/pmtiles'

View File

@ -81,10 +81,7 @@ export class ZimService {
count: number
query?: string
}): Promise<ListRemoteZimFilesResponse> {
// The machine-facing OPDS host. NOT `browse.library.kiwix.org`, which since 2026-08-29
// serves an anti-crawler confirmation page (HTTP 200 + HTML) that fails
// `isRawListRemoteZimFilesResponse` and 500s this endpoint. See kiwix_catalog_service.
const LIBRARY_BASE_URL = 'https://opds.library.kiwix.org/catalog/v2/entries'
const LIBRARY_BASE_URL = 'https://browse.library.kiwix.org/catalog/v2/entries'
// Kiwix returns pages of content unaware of what the user has installed locally. When
// the installed set is large, a single 12-item Kiwix page can come back with everything
// already installed → 0 post-filter items → frontend deadlock (#731). Accumulate across