feat: add WeRead adapter with 7 commands#89
Merged
jackwener merged 1 commit intojackwener:mainfrom Mar 19, 2026
Merged
Conversation
Add weread adapter for issue jackwener#82, covering search, rankings, book details, bookshelf, notebooks, highlights, and notes. Public commands (no login required): - weread search <keyword> — search books - weread ranking [category] — book rankings (all/rising/category ID) Private commands (cookie auth via browser): - weread book <bookId> — book details - weread shelf — personal bookshelf - weread notebooks — books with highlights/notes - weread highlights <bookId> — underlines in a book - weread notes <bookId> — personal notes on a book Closes jackwener#82
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.
Summary
Closes #82. Adds a WeRead (微信读书) adapter with 7 commands covering search, rankings, book details, bookshelf, and note export.
Public commands (no login required, Node.js fetch):
weread search <keyword>— search booksweread ranking [category]— book rankings (all / rising / category ID)Private commands (cookie auth via browser):
weread book <bookId>— book detailsweread shelf— personal bookshelfweread notebooks— list books with highlights/notesweread highlights <bookId>— underlines in a bookweread notes <bookId>— personal notes/thoughts on a bookArchitecture
src/clis/weread/utils.tswith two fetch modes:fetchWebApi— Node.js direct fetch for public endpoints (weread.qq.com/web/*)fetchWithPage— browserpage.evaluatefor private endpoints (i.weread.qq.com/*)cli()registrationVerified API endpoints
weread.qq.com/web/search/globalweread.qq.com/web/bookListInCategory/{cat}i.weread.qq.com/*Test plan
formatDate,fetchWebApi,fetchWithPage(15 tests)weread searchandweread rankinginpublic-commands.test.tsweread search python,weread ranking allshelf.progress,book.rating,notebooks.noteCountfield mappings are from community docs and marked with TODO for runtime verification