Skip to content

fix(xiaohongshu): support anonymous share-link feeds - #43

Open
gkeyes wants to merge 1 commit into
yllhwa:mainfrom
gkeyes:fix/xiaohongshu-share-browser
Open

gkeyes wants to merge 1 commit into
yllhwa:mainfrom
gkeyes:fix/xiaohongshu-share-browser

Conversation

@gkeyes

@gkeyes gkeyes commented Sep 28, 2026

Copy link
Copy Markdown

Summary

Xiaohongshu profile SSR has changed: anonymous requests can return user data while note groups or note IDs are empty/redacted. This restores the user feed without requiring login cookies.

  • preserve public share context (xsec_token, xsec_source, shareRedId, apptime, share_id, share_channel)
  • parse the current Vue/SSR state wrappers and common non-JSON literals
  • try normal fetch first, then fall back to Cloudflare Browser Run only when a public share token is available
  • keep anonymous note cards when noteId is redacted, with stable GUIDs and HTTPS cover fallback
  • cache generated RSS responses and support refresh=1
  • add the Browser binding, @cloudflare/puppeteer, lockfile entries, and dependency install step required for deployment

Validation

  • based directly on upstream main, one commit only
  • npm ci --no-audit --no-fund passed
  • wrangler deploy --dry-run passed
  • tested end-to-end with public Xiaohongshu share URLs: RSS returned HTTP 200 with feed items, without Cookie/login

Validation run: https://github.com/gkeyes/RSSWorker/actions/runs/36375405323

Known limitation

When Xiaohongshu redacts the note ID completely, the item link falls back to the HTTPS cover image so the feed remains usable and deduplicated. This PR does not add pubDate.

Related to #15, #17 and the temporary fix in #21.

- preserve public share context and parse current SSR state
- fall back to Cloudflare Browser Run when static fetch returns no notes
- keep redacted note cards with stable GUIDs and cache RSS responses
- add Browser binding and puppeteer dependency for deployment
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