Wire Route B (DaddyLive / dembed.st channel route) for free-to-air NCAAW coverage #189

Closed
opened 2026-11-17 15:12:26 -05:00 by cmoriarty · 1 comment
Owner

Summary

Wire Route B — the DaddyLive / dembed.st channel route — as a new stream source, for the women's-college-basketball (NCAAW) games it captures on free-to-air channels (CW / SEC Network / BTN). Route B was identified in #86 and its mechanism proven end-to-end live on 2026-11-04, but it was never wired: it is a new source kind (a fixed set of channels plus a game→channel mapping from a schedule feed), not a per-game-page source like the wired sportsurge / thetvapp / watchsports.

Adoption bar (per the operator): this must be well-designed and thoroughly tested before it is adopted. Do not wire it on the strength of the 2026-11-04 mechanism proof alone — the open questions below need a design, and the live re-test plus the token-refresh proof are required.

Why

The NCAAW gap is structural (docs/stream-sources.md, "2026-11-17 — NCAAW round three"): most women's games air on paywalled conference services (ESPN+, B1G+, MW+, ACCNX, SECN+) that no free aggregator re-streams. The wired sources (watchsports, thetvapp) list only the handful of NCAAW games their users post. Route B is the one free path that reaches NCAAW games on a free-to-air channel: it maps a game to a broadcast channel and plays that channel. On 2026-11-17 it mapped 2 of 37 NCAAW games to a channel (Rider–FDU; Texas Southern–Oklahoma on SEC Network); the rest were "Channel Not Listed" (the paywalled bulk). So the realistic expectation is a handful of extra NCAAW games per day, not the bulk — but it is an independent network from the wired sources and reaches games they do not list.

What is already known (mechanism proven live 2026-11-04 — do not re-derive)

The chain, hop for hop (docs/stream-sources.md, "2026-11-03/04" Route B and "2026-11-08/09"):

  1. Schedule feed (ungated): https://ntv.cx/api/get-matches?server=phoenix&type=both. Each match carries sources[].source (the channel slug, e.g. secnetworkusa) and sources[].url (e.g. https://thedaddy.li/stream/stream-385.php). A game with no channel is channelnotlistedjust / stream-00.php.
  2. Channel page → player: the channel page embeds dembed.st/premiumtv/daddy.php?id=<ch> (no Cloudflare gate, plain curl), which carries const SRC = "https://edge.wedd48c.top/premium<ch>/index.m3u8" and const CHANNEL in plain text.
  3. Token: GET <edge>/api/playlist-token?slug=<channel> requires the header Origin: https://dembed.st (403 "forbidden" without) and returns {"token": "<epoch>.<32-hex>", "ttl": 120} — IP-bound, 120 s TTL.
  4. Manifest: the m3u8 fetches with ?t=<token>&_=<ts> → 200, live HLS, ~6.1 s segments, TARGETDURATION 7.
  5. Segments: PNG images on TikTok's CDN (p16-common-sign.tiktokcdn-us.com, content-type image/png, ~4.1 MB each). The pixel bytes are TIKTIKPX, a big-endian 4-byte length and gzip → clean MPEG-TS. packed.py already unwraps this exact layout (#68).
  6. The player page refuses to play outside an iframe (isEmbedded check) — irrelevant for a direct-API adapter that reads the token + manifest itself.

The DaddyLive family's domains rotate (dlive.sx / dlhd.st → thedaddy.pk / thedaddy.li; the edge host edge.wedd48c.top rotates). The 2026-11-17 re-check found the channel set no longer carries ESPN+ USA / SECN+ / ACCNX (the 2026-11-03/04 note's channels) — now only BTN, CW, ESPN, SEC Network, Fox Sports 1/2.

Open design questions (need a design before implementation)

  1. New source kind, not a per-game adapter. The wired Adapter protocol is per-game (resolve(game) → StreamRef, or candidates(game)). Route B is a channel source: a fixed channel list (refreshed on a cadence) + a game→channel map (from the feed) + a per-channel stream read (token + manifest). How does this fit resolver/ without forcing the channel model onto the per-game adapters? (A separate adapter kind, a new candidates shape, or a channel registry the ladder reads?)
  2. Game→channel matching. The feed names games by its own title/flags ("🏀 Women's College Basketball : Rider 🇺🇸 vs Fairleigh Dickinson 🇺🇸"), not ESPN's ids. How does a feed game match an ESPN feed entry — the hub's matchup_matches name matching, or does the feed carry an ESPN id somewhere we can key on?
  3. Token refresh for a long game. The token is IP-bound with a 120 s TTL, but a channel plays for ~2 h. The app's proxy/rewriter must refresh the token (re-fetch playlist-token) before it expires and splice the new manifest — or the channel drops mid-game. Design the refresh (who owns it, how the rewriter rewrites the manifest URL on each refresh).
  4. Session binding. The 2026-11-08/09 note found the tokenized playlist answered the verifier 403 (session-bound; the page's own request carried the Origin). Confirm whether the direct-API read (Origin header, no browser session) is stable, and design around it if not.
  5. Channel + domain churn. The channel set and the hosts rotate. Design the discovery (how the app learns the current channel list + edge host) so a rotation is a config/data change, not a code change.
  6. A stricter extractor. The 2026-11-08/09 note found the reader took a JW Player analytics ping (prd.jwpltx.com/.../ping.gif?...&mu=<m3u8>) as the stream. This source needs a reader that does not.

Testing required before adoption

  • Unit tests: feed parsing (match → channel, "Channel Not Listed" handling), game→channel matching, token + manifest extraction, the TikTok-PNG segment unwrap (reuse packed.py).
  • Live re-test: the mechanism was proven 2026-11-04 but the domains rotate — re-verify end-to-end on a live channel-carrying NCAAW game (the 2026-11-17 candidates: Rider–FDU, Texas Southern–Oklahoma on SEC Network, or the next CW/SEC Network/BTN NCAAW game): feed → channel → token → manifest → segment, through the app's own resolve-and-proxy path, verified by the app's own verifier.
  • Token-refresh proof: prove a channel stays alive for the length of a game (the token-refresh design above), not just the first manifest.
  • Regression: the wired sources (sportsurge, thetvapp, watchsports) are unaffected; the e2e lane still passes.

References

  • docs/stream-sources.md — "2026-11-03/04 — … the two routes that do (#86)" (Route B mechanism), "2026-11-08/09 — … round two" (DaddyLive chain, session binding, JW ping), "2026-11-17 — NCAAW round three" (coverage re-check: 2 of 37, channel set narrowed).
  • Prior tickets: #86 (identified Route B), #127 (round two).
## Summary Wire **Route B** — the DaddyLive / dembed.st **channel route** — as a new stream source, for the women's-college-basketball (NCAAW) games it captures on free-to-air channels (CW / SEC Network / BTN). Route B was identified in #86 and its mechanism proven end-to-end live on 2026-11-04, but it was never wired: it is a **new source kind** (a fixed set of channels plus a game→channel mapping from a schedule feed), not a per-game-page source like the wired sportsurge / thetvapp / watchsports. **Adoption bar (per the operator): this must be well-designed and thoroughly tested before it is adopted.** Do not wire it on the strength of the 2026-11-04 mechanism proof alone — the open questions below need a design, and the live re-test plus the token-refresh proof are required. ## Why The NCAAW gap is structural (docs/stream-sources.md, "2026-11-17 — NCAAW round three"): most women's games air on paywalled conference services (ESPN+, B1G+, MW+, ACCNX, SECN+) that no free aggregator re-streams. The wired sources (watchsports, thetvapp) list only the handful of NCAAW games their users post. Route B is the one free path that reaches NCAAW games on a **free-to-air** channel: it maps a game to a broadcast channel and plays that channel. On 2026-11-17 it mapped 2 of 37 NCAAW games to a channel (Rider–FDU; Texas Southern–Oklahoma on SEC Network); the rest were "Channel Not Listed" (the paywalled bulk). So the realistic expectation is **a handful of extra NCAAW games per day**, not the bulk — but it is an independent network from the wired sources and reaches games they do not list. ## What is already known (mechanism proven live 2026-11-04 — do not re-derive) The chain, hop for hop (docs/stream-sources.md, "2026-11-03/04" Route B and "2026-11-08/09"): 1. **Schedule feed** (ungated): `https://ntv.cx/api/get-matches?server=phoenix&type=both`. Each match carries `sources[].source` (the channel slug, e.g. `secnetworkusa`) and `sources[].url` (e.g. `https://thedaddy.li/stream/stream-385.php`). A game with no channel is `channelnotlistedjust` / `stream-00.php`. 2. **Channel page → player**: the channel page embeds `dembed.st/premiumtv/daddy.php?id=<ch>` (no Cloudflare gate, plain curl), which carries `const SRC = "https://edge.wedd48c.top/premium<ch>/index.m3u8"` and `const CHANNEL` in plain text. 3. **Token**: `GET <edge>/api/playlist-token?slug=<channel>` requires the header `Origin: https://dembed.st` (403 "forbidden" without) and returns `{"token": "<epoch>.<32-hex>", "ttl": 120}` — **IP-bound, 120 s TTL**. 4. **Manifest**: the m3u8 fetches with `?t=<token>&_=<ts>` → 200, live HLS, ~6.1 s segments, TARGETDURATION 7. 5. **Segments**: PNG images on TikTok's CDN (`p16-common-sign.tiktokcdn-us.com`, content-type `image/png`, ~4.1 MB each). The pixel bytes are `TIKTIKPX`, a big-endian 4-byte length and gzip → clean MPEG-TS. **`packed.py` already unwraps this exact layout (#68).** 6. The player page refuses to play outside an iframe (`isEmbedded` check) — irrelevant for a direct-API adapter that reads the token + manifest itself. The DaddyLive family's domains rotate (dlive.sx / dlhd.st → thedaddy.pk / thedaddy.li; the edge host `edge.wedd48c.top` rotates). The 2026-11-17 re-check found the channel set no longer carries ESPN+ USA / SECN+ / ACCNX (the 2026-11-03/04 note's channels) — now only BTN, CW, ESPN, SEC Network, Fox Sports 1/2. ## Open design questions (need a design before implementation) 1. **New source kind, not a per-game adapter.** The wired `Adapter` protocol is per-game (`resolve(game) → StreamRef`, or `candidates(game)`). Route B is a *channel* source: a fixed channel list (refreshed on a cadence) + a game→channel map (from the feed) + a per-channel stream read (token + manifest). How does this fit `resolver/` without forcing the channel model onto the per-game adapters? (A separate adapter kind, a new candidates shape, or a channel registry the ladder reads?) 2. **Game→channel matching.** The feed names games by its own title/flags ("🏀 Women's College Basketball : Rider 🇺🇸 vs Fairleigh Dickinson 🇺🇸"), not ESPN's ids. How does a feed game match an ESPN feed entry — the hub's `matchup_matches` name matching, or does the feed carry an ESPN id somewhere we can key on? 3. **Token refresh for a long game.** The token is IP-bound with a 120 s TTL, but a channel plays for ~2 h. The app's proxy/rewriter must refresh the token (re-fetch `playlist-token`) before it expires and splice the new manifest — or the channel drops mid-game. Design the refresh (who owns it, how the rewriter rewrites the manifest URL on each refresh). 4. **Session binding.** The 2026-11-08/09 note found the tokenized playlist answered the verifier 403 (session-bound; the page's own request carried the Origin). Confirm whether the direct-API read (Origin header, no browser session) is stable, and design around it if not. 5. **Channel + domain churn.** The channel set and the hosts rotate. Design the discovery (how the app learns the current channel list + edge host) so a rotation is a config/data change, not a code change. 6. **A stricter extractor.** The 2026-11-08/09 note found the reader took a JW Player analytics ping (`prd.jwpltx.com/.../ping.gif?...&mu=<m3u8>`) as the stream. This source needs a reader that does not. ## Testing required before adoption - **Unit tests**: feed parsing (match → channel, "Channel Not Listed" handling), game→channel matching, token + manifest extraction, the TikTok-PNG segment unwrap (reuse `packed.py`). - **Live re-test**: the mechanism was proven 2026-11-04 but the domains rotate — re-verify end-to-end on a **live channel-carrying NCAAW game** (the 2026-11-17 candidates: Rider–FDU, Texas Southern–Oklahoma on SEC Network, or the next CW/SEC Network/BTN NCAAW game): feed → channel → token → manifest → segment, through the app's own resolve-and-proxy path, verified by the app's own verifier. - **Token-refresh proof**: prove a channel stays alive for the length of a game (the token-refresh design above), not just the first manifest. - **Regression**: the wired sources (sportsurge, thetvapp, watchsports) are unaffected; the e2e lane still passes. ## References - docs/stream-sources.md — "2026-11-03/04 — … the two routes that do (#86)" (Route B mechanism), "2026-11-08/09 — … round two" (DaddyLive chain, session binding, JW ping), "2026-11-17 — NCAAW round three" (coverage re-check: 2 of 37, channel set narrowed). - Prior tickets: #86 (identified Route B), #127 (round two).
Author
Owner

Closing as not adopted (2026-11-18).

Route B was designed and fully implemented on a local branch (route-b-daddylive, now deleted): the channel-source adapter, the ntv.cx feed merge, the channel token renewal, and the stricter extractor — with the full backend test lane (1329) and the e2e lane green. But the live re-test gate (the adoption bar) cannot pass: the route's mechanism changed after the 2026-11-04 proof, and it is not viable for the app.

What changed (verified 2026-11-17/18 against guaranteed-live 24/7 news channels — CNN, Fox News, BBC News, Sky News — so liveness was not the variable):

  • The edge's token endpoint is now gated by Cloudflare Turnstile. The 2026-11-04 plain-HTTP flow (Origin: https://dembed.st) is gone: the token 403s "forbidden" (retry-after: 3600) for every channel, live or dark. The dembed.st player now loads the Turnstile widget and sends its token to the edge.
  • FlareSolverr (production) does not bridge it. The player runs only inside the thedaddy.li iframe ("This player only works when embedded" top-level), the token is a network artifact its request.get does not expose, and the token endpoint 403s the solver's browser too (the Turnstile token is a request parameter, not a cookie).
  • Trawl (ghcr.io/germondai/trawl:1.11.1, the best off-the-shelf fit) does pass the Turnstile — its Camoufox browser solves the challenge and the player fetches the token (200, now carrying a new k field) — but the route is still unusable:
    • The tokenized manifest is bound to the browser's TLS/HTTP2 fingerprint: a plain client on the same egress IP (the token's tk proof embeds it) 403s across every URL shape (incl. k) and both User-Agents; no cookies are set by the edge.
    • Trawl's captureResponses cannot reliably capture the manifest (0/9 scrapes; the manifest fetch fires after the settle window's network-idle end).
    • The player does not play in trawl's browser (zero JW Player analytics pings; an autoplay/user-gesture gate in an automated browser).
    • Structurally, the manifest is a live HLS playlist (TARGETDURATION 7) re-fetched every ~6 s — no 4–40 s scrape can keep it fresh, so even a working capture would stall the stream.

Decision: not adopted. The only remaining path — a custom stealth-browser harvester (run Camoufox in-process, defeat autoplay, tap the iframe's manifest fetches every ~6 s) — is a fragile, ongoing-maintenance effort (Turnstile is a moving target) for a source whose measured benefit is two channel-carrying WCB games (that day's 37 WCB games: 2 with a real channel, 35 "Channel Not Listed"). The branch is deleted; nothing is merged and no spec deltas are applied.

The detailed evidence lived in docs/stream-sources.md ("2026-11-17 — NCAAW round three") on the deleted branch; the findings above are the standing record. Re-check only if the edge lifts the Turnstile gate (a 200 on a 24/7 news channel's token endpoint) or a reliable Turnstile+manifest harvester appears.

**Closing as not adopted (2026-11-18).** Route B was designed and fully implemented on a local branch (`route-b-daddylive`, now deleted): the channel-source adapter, the ntv.cx feed merge, the channel token renewal, and the stricter extractor — with the full backend test lane (1329) and the e2e lane green. But the live re-test gate (the adoption bar) cannot pass: the route's mechanism changed after the 2026-11-04 proof, and it is not viable for the app. **What changed** (verified 2026-11-17/18 against guaranteed-live 24/7 news channels — CNN, Fox News, BBC News, Sky News — so liveness was not the variable): - The edge's token endpoint is now gated by **Cloudflare Turnstile**. The 2026-11-04 plain-HTTP flow (`Origin: https://dembed.st`) is gone: the token 403s "forbidden" (`retry-after: 3600`) for every channel, live or dark. The dembed.st player now loads the Turnstile widget and sends its token to the edge. - **FlareSolverr (production) does not bridge it.** The player runs only inside the thedaddy.li iframe ("This player only works when embedded" top-level), the token is a network artifact its `request.get` does not expose, and the token endpoint 403s the solver's browser too (the Turnstile token is a request *parameter*, not a cookie). - **Trawl** (`ghcr.io/germondai/trawl:1.11.1`, the best off-the-shelf fit) *does* pass the Turnstile — its Camoufox browser solves the challenge and the player fetches the token (200, now carrying a new `k` field) — but the route is still unusable: - The tokenized manifest is bound to the **browser's TLS/HTTP2 fingerprint**: a plain client on the *same* egress IP (the token's `tk` proof embeds it) 403s across every URL shape (incl. `k`) and both User-Agents; no cookies are set by the edge. - Trawl's `captureResponses` **cannot reliably capture the manifest** (0/9 scrapes; the manifest fetch fires after the settle window's network-idle end). - The player **does not play** in trawl's browser (zero JW Player analytics pings; an autoplay/user-gesture gate in an automated browser). - Structurally, the manifest is a **live** HLS playlist (TARGETDURATION 7) re-fetched every ~6 s — no 4–40 s scrape can keep it fresh, so even a working capture would stall the stream. **Decision: not adopted.** The only remaining path — a custom stealth-browser harvester (run Camoufox in-process, defeat autoplay, tap the iframe's manifest fetches every ~6 s) — is a fragile, ongoing-maintenance effort (Turnstile is a moving target) for a source whose measured benefit is two channel-carrying WCB games (that day's 37 WCB games: 2 with a real channel, 35 "Channel Not Listed"). The branch is deleted; nothing is merged and no spec deltas are applied. The detailed evidence lived in `docs/stream-sources.md` ("2026-11-17 — NCAAW round three") on the deleted branch; the findings above are the standing record. Re-check only if the edge lifts the Turnstile gate (a 200 on a 24/7 news channel's token endpoint) or a reliable Turnstile+manifest harvester appears.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/sports-breaker#189
No description provided.