fix(zhihu): stop question command failing on unused detail fetch#606
Merged
jackwener merged 2 commits intojackwener:mainfrom Mar 30, 2026
Merged
fix(zhihu): stop question command failing on unused detail fetch#606jackwener merged 2 commits intojackwener:mainfrom
jackwener merged 2 commits intojackwener:mainfrom
Conversation
|
Tested the fix branch locally — confirmed working. $ node /tmp/opencli-test/dist/main.js zhihu question 2021881398772981878 --limit 5 -f jsonReturns 5 answers with correct author, votes, and content. No login error. Previously the same command on v1.5.6 gave Env: macOS Darwin 25.4.0 / Node v22.22.1 / Extension v1.5.5 / Chrome Profile with active Zhihu session. Thanks @Astro-Han for the quick turnaround! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix
zhihu questionso it no longer fails when an unused question detail request returns403.The adapter was fetching both question detail and answers in parallel, but only the answers response was actually used in the CLI output. In a real logged-in Browser Bridge session, the detail request now returns
403with Zhihu error code10003, which caused the whole command to surface a misleadingAuthRequiredErroreven though the answers request succeeded.This change removes the unused detail request and keeps the command focused on the answers data it already renders.
Related issue:
Type of Change
Checklist
Documentation (if adding/modifying an adapter)
docs/adapters/(if new adapter)docs/adapters/index.mdtable (if new adapter)docs/.vitepress/config.mts(if new adapter)README.md/README.zh-CN.mdwhen command discoverability changedCliErrorsubclasses instead of rawErrorScreenshots / Output
Before the fix, this returned:
After the fix, the same command returns answer rows successfully.
Checks run:
npx vitest run src/clis/zhihu/question.test.ts --project adapternpm run test:adapternpm testnpm run buildnpx tsx src/main.ts zhihu question 2021881398772981878 --limit 3 -f jsonnode dist/main.js zhihu question 2021881398772981878 --limit 3 -f json