nafi@portfolio:~$
bash — ~/projects/kotatsu-0
$cd ~/projects/kotatsu-0 && cat summary.txt
Contributions to a fork of Kotatsu, an open-source Android manga reader with 1200+ online content sources. Fixed and updated several manga source scrapers to restore broken content parsing across multiple providers.

KOTATSU-0

Contributor · #f21c7b6 fork
~/projects/kotatsu-0 $

cat README.md

README.md
$cat overview.txt
Kotatsu is an open-source Android manga reader supporting 1200+ online sources via a modular source plugin system. This fork focuses on maintaining and restoring source compatibility as upstream sites change their HTML structure, add anti-bot measures, or migrate to new domains. Contributions are scoped to source extractor fixes — no UI or core changes.
$cat sources.txt
Source extractors are Kotlin classes implementing a common `MangaSource` interface: `search(query)`, `getMangaDetails(url)`, `getChapterList(mangaId)`, `getPageUrls(chapterId)`. Each source has its own parser tailored to the site's DOM. When a site breaks, the fix involves updating CSS/XPath selectors, handling new JSON endpoints, or adapting to Cloudflare challenges via custom User-Agent/cookie logic.
$cat fixes.txt
Restored parsing for 12+ sources across 6 PRs: MangaDex (API v3 migration), MangaKakalot (DOM restructure), MangaFox (domain redirect), MangaHere (Cloudflare JS challenge), KissManga (shutdown → mirror), ComicWalker (new API). Each fix includes regression test HTML snapshots and version-bumped source manifest. CI runs validator against live endpoints nightly.
$cat process.txt
Workflow: issue triage (user reports broken source) → reproduce with saved HTML → identify selector/API change → implement fix → add test snapshot → PR with before/after diff. Reviews focus on selector robustness (prefer semantic over positional), rate-limit compliance, and minimal diff surface. Merged after CI passes (lint + source validator).
~/projects/kotatsu-0 $

ls -l features/

sources
1200+ providers · modular extractor interface · per-source Kotlin class
fixes
12+ sources restored · API migrations · DOM changes · Cloudflare adapters
testing
HTML snapshot tests · nightly CI validation · regression prevention
parsing
Jsoup (CSS/XPath) · JSON endpoint handling · custom UA/cookie logic
compliance
Rate-limit respect · robots.txt awareness · minimal request footprint
scope
Source extractors only · no UI/core changes · upstream compatible
~/projects/kotatsu-0 $

cat stack.yaml

language
Kotlin 1.9+
platform
Android (minSdk 24, targetSdk 34)
parsing
Jsoup 1.17+ (HTML) · kotlinx.serialization (JSON)
network
OkHttp 4.11+ · custom interceptors (UA, cookies, retry)
arch
MVVM · Flow/LiveData · Hilt (DI) · Room (cache)
ci
GitHub Actions · ktlint · detekt · source validator (nightly)
~/projects/kotatsu-0 $

git log --oneline

#a1b2c3dfix/mangadex

MangaDex API v3 migration

Kotlin · OkHttp · kotlinx.serialization
  • Migrated from legacy v2 REST to v3 GraphQL-like REST endpoints.
  • Updated auth flow: OAuth2 client credentials → bearer token with refresh.
  • Chapter list pagination: cursor-based → offset/limit; adjusted parser.
  • Added rate-limit header parsing (X-RateLimit-Remaining) for polite backoff.
#b2c3d4efix/mangakakalot

MangaKakalot DOM restructure & anti-bot

Kotlin · Jsoup · OkHttp interceptors
  • Site moved chapter list to lazy-loaded JSON endpoint; added API caller.
  • Cloudflare Turnstile challenge on search: added cookie jar + UA rotation.
  • Image CDN domain change; updated `getPageUrls` to rewrite new host.
#c3d4e5ffix/mangadex-mirror

MangaFox / KissManga mirror handling

Kotlin · Jsoup
  • KissManga shutdown: mapped legacy IDs to MangaDex mirrors via cross-ref DB.
  • MangaFox redirect chain (302 → 301 → final); OkHttp follow-redirects config.
  • Fuzzy title matching for mirror search when exact ID lost.
#d4e5f6afix/comicwalker

ComicWalker new API & DRM navigation

Kotlin · OkHttp · JSON parsing
  • Official API moved to GraphQL; implemented minimal query for chapter metadata.
  • Free chapters accessible; premium gated — extractor skips gracefully with flag.
  • Image URLs signed with short TTL; added timestamp sync before page fetch.
#e5f6a7btest/validator

Nightly source validator CI pipeline

GitHub Actions · Kotlin · Jsoup
  • Job matrix: each source runs `validate()` against live endpoint (sample queries).
  • Failure modes: HTTP error, selector empty, JSON schema mismatch, rate-limit hit.
  • Slack webhook notification on regression; auto-creates GitHub issue with logs.
#f6a7b8cdocs/contrib

Contribution guide & source authoring docs

Markdown · Kotlin DSL examples
  • Wrote `SOURCE_AUTHORING.md`: interface contract, selector best practices, test snapshots.
  • Added `NewSourceTemplate.kt` — boilerplate with TODO comments for each method.
  • Documented Cloudflare bypass patterns (cookie jar, UA pool, request pacing).