Conversation
… stream URLs The web /livelist page server-renders __INITIAL_STATE__.liveList with everything a viewer needs per room: id/title/viewer count (tRoomInfo), host identity (tLiveHostInfo), and - inside the double-nested JSON string roomExtraInfo.live_stream_info - the FLV master URL, which the CDN serves without cookies (verified live: HTTP 200, video/x-flv, 1.6MB delivered in an 8s probe). No room-page visit is needed for discovery or playback; `mpv <stream_url>` plays the room. extractLiveStreamUrl parses the nested JSON node-side and falls back to the flvUrl param of the xhsdiscover:// deeplink for malformed payloads. The command declares a persistent site session and forces a real reload when the warm tab already shows the live list (listings churn constantly); the tiny navigateFresh helper is a deliberate private copy of the one jackwener#2461 adds to shared.js, keeping this PR merge-order independent - switch to the shared import once that lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
yisiliu
force-pushed
the
feat/xiaohongshu-lives
branch
from
September 6, 2026 04:12
933abeb to
cf4ebc4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
xiaohongshu liveslists currently-live rooms with, per room: id, title, host, viewer count, room URL — and a directly playable FLVstream_url.mpv <stream_url>plays the room; no room-page visit needed.How
The web
/livelistpage server-renders__INITIAL_STATE__.liveListwith everything already in it; the stream URL sits inside the double-nested JSON stringroomExtraInfo.live_stream_info(streams[].master_url, default-stream preferred), and the CDN serves it without cookies — verified live: HTTP 200,video/x-flv, 1.6MB delivered in an 8-second probe.extractLiveStreamUrlparses the nested JSON node-side and falls back to theflvUrlparam of thexhsdiscover://deeplink for malformed payloads. The command follows the feed pattern from #2461: persistent session + always-fresh navigation (live listings churn constantly) + one hydration retry.Verification
TDD: 9 unit tests (nested-JSON parsing, deeplink fallback, row mapping,
--limit, warm-tab forced reload, hydration retry, EMPTY_RESULT) written first; boundary convention test includeslivesin the persistent list; doc table row added; manifest regenerated (1367 entries). Live: returned 4 real rooms with titles/hosts/viewer counts and working stream URLs.Known v1 limits (stated intentionally): SSR first screen only (~26 rooms, no scroll pagination), no category filter yet (
liveList.categoriesexists in the store — a--channelarg is a natural follow-up), no in-room interaction.Part of the xiaohongshu arc: #2470.
🤖 Generated with Claude Code