Skip to content

fix(route/zhihu): use /members/ API for org posts instead of deprecated /org/#22425

Closed
SWZ128 wants to merge 1 commit into
DIYgod:masterfrom
SWZ128:fix/zhihu-org-posts-api-path
Closed

fix(route/zhihu): use /members/ API for org posts instead of deprecated /org/#22425
SWZ128 wants to merge 1 commit into
DIYgod:masterfrom
SWZ128:fix/zhihu-org-posts-api-path

Conversation

@SWZ128

@SWZ128 SWZ128 commented Jul 4, 2026

Copy link
Copy Markdown

Involved Issue / 该 PR 相关 Issue

Close #

Example for the Proposed Route(s) / 路由地址示例

NOROUTE

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route
  • Bug fix

Note / 说明

Problem / 问题

/zhihu/posts/org/:id returns 503. Root cause: zhihu's /api/v4/org/:id/articles endpoint is deprecated, org articles now all use /api/v4/members/:id/articles.
/zhihu/posts/org/:id 返回 503。根因:zhihu 的 /api/v4/org/:id/articles 端点已废弃,现在 org 类型文章统一走 /api/v4/members/:id/articles

posts.ts L62 previously branched by usertype:
posts.ts L62 原来按 usertype 分叉:

  • people/api/v4/members/...
  • org/api/v4/org/... ✗ (returns 404 / 返回 404)

Fix / 修复

Changed to always use /api/v4/members/....
改为统一 /api/v4/members/...

Verification / 验证

Requires logged-in zhihu cookies (z_c0, d_c0, __zse_ck):
需要知乎登录后的 cookies(z_c0d_c0__zse_ck):

ZHIHU_COOKIES='z_c0=<value>; d_c0=<value>; __zse_ck=<value>' npm run dev

# New terminal / 新终端测试
# org route (503 before, 200 after fix) / org 路由(修复前 503,修复后 200)
curl -so /dev/null -w "%{http_code}\n" http://localhost:1200/zhihu/posts/org/huo-rong-an-quan-shi-yan-shi

# people route (always 200, unaffected) / people 路由(始终 200,不受影响)
curl -so /dev/null -w "%{http_code}\n" http://localhost:1200/zhihu/posts/people/frederchen

people unaffected, org restored.
people 不受影响,org 恢复。

…ed /org/

Zhihu now serves organization articles through `/api/v4/members/` API
instead of the deprecated `/api/v4/org/`. This caused all
`/zhihu/posts/org/:id` routes to return 503 NotFoundError.
@github-actions github-actions Bot added the route label Jul 4, 2026
@SWZ128 SWZ128 closed this Jul 4, 2026
@github-actions github-actions Bot reopened this Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Auto Route Test failed, please check your PR body format and reopen pull request. Check logs for more details.
自动路由测试失败,请确认 PR 正文部分符合格式规范并重新开启,详情请检查 日志

@github-actions github-actions Bot added the auto: route no found Automated test failed due to route can not be found in PR description body label Jul 4, 2026
@github-actions github-actions Bot closed this Jul 4, 2026
@github-actions github-actions Bot added the auto: DO NOT merge Docker won’t even start label Jul 4, 2026
@github-actions github-actions Bot reopened this Jul 4, 2026
@github-actions github-actions Bot removed the auto: DO NOT merge Docker won’t even start label Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Auto Route Test failed, please check your PR body format and reopen pull request. Check logs for more details.
自动路由测试失败,请确认 PR 正文部分符合格式规范并重新开启,详情请检查 日志

@github-actions github-actions Bot closed this Jul 4, 2026
@github-actions github-actions Bot added the auto: DO NOT merge Docker won’t even start label Jul 4, 2026
@github-actions github-actions Bot reopened this Jul 4, 2026
@github-actions github-actions Bot added auto: route test bypassed and removed auto: DO NOT merge Docker won’t even start auto: route no found Automated test failed due to route can not be found in PR description body labels Jul 4, 2026
@TonyRL

TonyRL commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Already covered by #22319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants