Skip to content

feat(xueqiu): add comments command#587

Merged
jackwener merged 2 commits intojackwener:mainfrom
Astro-Han:feat/xueqiu-comments
Mar 29, 2026
Merged

feat(xueqiu): add comments command#587
jackwener merged 2 commits intojackwener:mainfrom
Astro-Han:feat/xueqiu-comments

Conversation

@Astro-Han
Copy link
Copy Markdown
Contributor

@Astro-Han Astro-Han commented Mar 29, 2026

Description

Add a new xueqiu comments <symbol> command for stock-scoped discussion posts.

This PR adds a TypeScript adapter that:

  • fetches stock discussion posts with browser session cookies
  • supports --limit with a clear 1..100 contract
  • normalizes output fields for downstream JSON/table usage
  • handles auth/challenge failures, empty pages, duplicate rows, and malformed items more defensively

Closes #576

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Screenshots / Output

Checks run:

  • npx vitest run src/clis/xueqiu/comments.test.ts
  • npm run typecheck
  • npm run test:adapter

@jackwener jackwener merged commit cf79ec5 into jackwener:main Mar 29, 2026
13 checks passed
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.

Feature: Add xueqiu comments/discussions command for individual stocks

2 participants