feat(qimao): add qimao site adapter#1424
Open
skinapi2025 wants to merge 1 commit into
Open
Conversation
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
This PR adds a new
qimaosite adapter for 七猫中文网 and wires it into OpenCLI's built-in adapter registry.New Qimao commands included in this PR:
opencli qimao searchopencli qimao catalogopencli qimao bookopencli qimao readopencli qimao browseopencli qimao browse-optionsopencli qimao rankopencli qimao rank-optionsWhat’s Added
Core book flow
Implemented the basic read pipeline for Qimao books:
search: search books by title, author, or charactercatalog: list chapters for a bookbook: fetch book detail dataread: read chapter content by chapter id or chapter indexCategory browsing
Added support for Qimao classification pages:
browse: list books from category pages with filtersbrowse-options: enumerate available filter values for programmatic useSupported browse dimensions:
Ranking lists
Added support for Qimao ranking pages:
rank: fetch ranking list resultsrank-options: enumerate ranking dimensions for programmatic useSupported rank dimensions:
boy/girlhot/new/over/collect/updatedate/monthImplementation Notes
Data sources
The adapter uses a mix of public endpoints and browser-backed extraction depending on the page type:
Shared helpers
Added shared utilities for:
Text cleanup
Included normalization improvements for Qimao text fields:
read.contentremoves empty linessearch.introremoves empty linesread.book_titleincludes fallback extraction when the chapter page does not expose a stable title directlyTests
Added adapter tests for Qimao coverage in
clis/qimao/qimao.test.js.Covered areas:
Validation performed:
npx vitest run --project adapter clis/qimao/qimao.test.js npm testRegistry / Discovery
Updated
cli-manifest.jsonso the newqimaocommands are discoverable by OpenCLI.Notes