Skip to content

add 36kr news command: latest articles from RSS feed#2

Open
tamnd wants to merge 1 commit into
mainfrom
feat/pr1-kr36-news
Open

add 36kr news command: latest articles from RSS feed#2
tamnd wants to merge 1 commit into
mainfrom
feat/pr1-kr36-news

Conversation

@tamnd

@tamnd tamnd commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Implements kr36-cli (binary `kr36`) for 36kr.com, a leading Chinese tech-news outlet.

Commands

  • `news` -- list the latest articles from the 36kr RSS feed

Changes

  • Renames `Article.PubDate` / `pub_date` to `Article.Published` / `published` to match spec
  • Expands wire types: `rssChannel` with XMLName binding; `GUID` field on `rssItem`
  • Extends test suite from 5 to 9 cases: empty feed, context cancel, bad XML, limit-zero,
    rank assignment, retry-on-503, HTML stripping, user-agent header, full item parse

Notes

Single public RSS feed at 36kr.com/feed, no auth, no API key.
CDATA link and HTML-rich descriptions handled transparently.
All tests run offline via httptest.

- Article.Published (json: published) replaces PubDate to match spec
- Wire types expanded: rssChannel with XMLName, GUID field on rssItem
- Test suite extended to 9 cases covering empty feed, context cancel,
  bad XML, limit-zero, ranks, retry-on-503, HTML stripping, user-agent
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.

1 participant