Skip to content

feat(36kr): add 36氪 CLI adapter#461

Merged
jackwener merged 3 commits intojackwener:mainfrom
Conn-Ho:feat/36kr-adapter
Mar 26, 2026
Merged

feat(36kr): add 36氪 CLI adapter#461
jackwener merged 3 commits intojackwener:mainfrom
Conn-Ho:feat/36kr-adapter

Conversation

@Conn-Ho
Copy link
Copy Markdown
Contributor

@Conn-Ho Conn-Ho commented Mar 26, 2026

Summary

Adds a new CLI adapter for 36kr (36氪), China's leading tech/startup news platform.

Commands

Command Strategy Description
36kr news PUBLIC (RSS) Latest articles with title, summary, date, url — no browser needed
36kr hot INTERCEPT Trending articles; supports --type renqi/zonghe/shoucang/catalog
36kr search <query> INTERCEPT Search articles by keyword
36kr article <id> INTERCEPT Fetch article detail: title, author, date, body excerpt

Notes

  • news uses the public RSS feed (https://www.36kr.com/feed) — works instantly without a browser
  • hot, search, article use the INTERCEPT strategy with DOM scraping since 36kr's REST APIs are either deprecated or return stale cached data
  • hot --type supports all three 36kr ranking lists: 人气榜 (renqi), 综合榜 (zonghe), 收藏榜 (shoucang)
  • Includes 3 unit tests for the RSS parsing logic in news.test.ts

Test plan

  • 36kr news --limit 5 — returns real-time articles from RSS
  • 36kr hot --limit 10 — returns current trending articles
  • 36kr hot --type renqi --limit 5 — returns 人气榜
  • 36kr hot --type zonghe --limit 5 — returns 综合榜
  • 36kr search "DeepSeek" --limit 5 — returns relevant search results
  • 36kr article <id> — returns title, author, date, body
  • vitest run --project adapter src/clis/36kr/ — 3/3 tests pass

🤖 Generated with Claude Code

Conn-Ho and others added 3 commits March 26, 2026 14:48
- news: latest articles via public RSS feed (no browser needed), includes title/summary/date/url
- hot: trending articles via INTERCEPT strategy, supports --type renqi/zonghe/shoucang/catalog
- search: keyword search via INTERCEPT + DOM scraping
- article: fetch article detail (title/author/date/body) by ID or URL

Also adds vitest adapter project entry for 36kr tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jackwener jackwener merged commit 22399ce into jackwener:main Mar 26, 2026
22 checks passed
@jackwener jackwener mentioned this pull request Mar 26, 2026
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