Skip to content

fix(zh.copymanga, zh.relamanhua, ru.desu): send Accept: application/json on JSON API requests - #832

Merged
kkantan merged 1 commit into
Aidoku-Community:mainfrom
dyphire:zh.relamanhua
Oct 22, 2026
Merged

kkantan merged 1 commit into
Aidoku-Community:mainfrom
dyphire:zh.relamanhua

Conversation

@dyphire

@dyphire dyphire commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

The copymanga site family migrated its API endpoints to Django REST framework, which content-negotiates on the Accept header: requests carrying a browser-style header suite (injected by some hosts) now receive the browsable-API HTML page instead of the JSON envelope, breaking JSON parsing for chapter lists, search, login and favorites.

  • zh.copymanga / zh.relamanhua: pin Accept: application/json on search and chapter list requests; also cover copymanga's login and favorites endpoints
  • ru.desu: add apply_api_headers() pinning Accept: application/json on all /api/... requests, replacing the browser-style Accept that ranked text/html above application/json

Bump zh.copymanga to v24, zh.relamanhua to v3, ru.desu to v8.

Close #830

…son on JSON API requests

The copymanga site family migrated its API endpoints to Django REST
framework, which content-negotiates on the Accept header: requests
carrying a browser-style header suite (injected by some hosts) now
receive the browsable-API HTML page instead of the JSON envelope,
breaking JSON parsing for chapter lists, search, login and favorites.

- zh.copymanga / zh.relamanhua: pin Accept: application/json on search
  and chapter list requests; also cover copymanga's login and
  favorites endpoints
- ru.desu: add apply_api_headers() pinning Accept: application/json on
  all /api/... requests, replacing the browser-style Accept that ranked
  text/html above application/json

Bump zh.copymanga to v24, zh.relamanhua to v3, ru.desu to v8.
Comment on lines +39 to +41
// The API endpoints content-negotiate (Django REST framework): without an
// explicit `Accept` header, hosts that inject a browser header suite get
// the browsable-API HTML page instead of the JSON envelope.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments like this are verbose and should be rephrased to be more understandable.

@kkantan
kkantan merged commit 19d3578 into Aidoku-Community:main Oct 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zh.copymanga / zh.relamanhua: chapters not loading

2 participants