Skip to content

feat(amazon): unify ranking commands for bestsellers/new-releases/movers-shakers#724

Merged
jackwener merged 2 commits intojackwener:mainfrom
leozejia:feat/amazon-ranking-core
Apr 3, 2026
Merged

feat(amazon): unify ranking commands for bestsellers/new-releases/movers-shakers#724
jackwener merged 2 commits intojackwener:mainfrom
leozejia:feat/amazon-ranking-core

Conversation

@leozejia
Copy link
Copy Markdown
Contributor

@leozejia leozejia commented Apr 3, 2026

Summary\n- add a shared amazon rankings core and route bestsellers through it\n- add amazon new-releases and amazon movers-shakers commands using the same extraction/normalization pipeline\n- unify ranking schema output across all 3 commands with consistent provenance and category fields\n- add URL/path validation per ranking list and normalize tracking ref segments to canonical ranking URLs\n- add best-effort category_node_id extraction and normalized visible_category_links metadata\n\nTests\n- npm run test:adapter -- src/clis/amazon/shared.test.ts src/clis/amazon/bestsellers.test.ts src/clis/amazon/rankings.test.ts\n- npm run build\n- runtime check: list includes amazon/bestsellers, amazon/new-releases, amazon/movers-shakers and each command returns ranked JSON items

@jackwener
Copy link
Copy Markdown
Owner

Did you already join WeChat group? If not,you can contact me.

…or all ranking types

1. Remove unnecessary __test__ wrapper from bestsellers.ts — the test
   now uses normalizeRankingCandidate directly from rankings.ts,
   eliminating a needless indirection layer.

2. Fix isRankingPaginationUrl to detect pagination refs for all ranking
   types: zg_bs_pg_ (bestsellers), zg_bsnr_pg_ (new releases),
   zg_bsms_pg_ (movers & shakers). Previously only matched the
   bestsellers-specific ref pattern.
@jackwener jackwener merged commit dcad060 into jackwener:main Apr 3, 2026
11 checks passed
@leozejia
Copy link
Copy Markdown
Contributor Author

leozejia commented Apr 3, 2026

@jackwener 没加呢,在哪加?我推特上找你?

@leozejia leozejia deleted the feat/amazon-ranking-core branch April 3, 2026 14:13
@jackwener
Copy link
Copy Markdown
Owner

推特找我就行 @leozejia

@leozejia
Copy link
Copy Markdown
Contributor Author

leozejia commented Apr 3, 2026

私信dd你了 @jackwener

just-buer pushed a commit to just-buer/opencli that referenced this pull request Apr 8, 2026
…ers-shakers (jackwener#724)

* feat(amazon): unify ranking adapters for three signal boards

* refactor: simplify bestsellers wrapper and fix pagination detection for all ranking types

1. Remove unnecessary __test__ wrapper from bestsellers.ts — the test
   now uses normalizeRankingCandidate directly from rankings.ts,
   eliminating a needless indirection layer.

2. Fix isRankingPaginationUrl to detect pagination refs for all ranking
   types: zg_bs_pg_ (bestsellers), zg_bsnr_pg_ (new releases),
   zg_bsms_pg_ (movers & shakers). Previously only matched the
   bestsellers-specific ref pattern.

---------

Co-authored-by: 泽加武 <zejiawu@zejiawudeMac-mini.local>
Co-authored-by: jackwener <jakevingoo@gmail.com>
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.

2 participants