Follow the player iframe when the solver's page has no stream (dudestream1 → embedsports.me) #78

Closed
opened 2026-11-01 15:11:06 -05:00 by cmoriarty · 3 comments
Owner

Seen 2026-11-01 on the Villanova vs. Notre Dame games (17:01–18:24 UTC): dudestream1.com and tvsportslive.fr failed 7 times each with "the player page is behind a bot challenge and its stream could not be read".

What happens

  • Our app's browser gets a 403 from Cloudflare on the player page, so _read_player_page (backend/app/resolver/sportsurge.py) hands it to the solver.
  • The solver gets through (FlareSolverr: "Challenge solved!", HTTP 200, cf_clearance set).
  • m3u8_from_html then looks only in that page's own HTML. On dudestream1 the stream isn't there: the video plays in a frame loaded from https://embedsports.me/basketball/<game>-stream-1. The app never opens that frame, so it reports "no stream found".
  • embedsports.me has no Cloudflare check: a plain request with dudestream1 as the Referer gets 200.
  • tvsportslive.fr: the solver's answer was an ad network's tracking page (a hidden form posting to /api/users), not a player. It may be a dead end.

Proposed fix
When the page the solver returns has no stream link, take its player frames (skip javascript: frames, chat widgets and ad frames) and read each with read_stream_from_page in our own browser, with the player page as the Referer.

Check
During a live game that lists dudestream1, the link verifies and plays. Not related to #71 ("Sandbox detected"): the word "sandbox" in dudestream1's page belongs to an ad script, and our browser never reached the player.

Seen 2026-11-01 on the Villanova vs. Notre Dame games (17:01–18:24 UTC): dudestream1.com and tvsportslive.fr failed 7 times each with "the player page is behind a bot challenge and its stream could not be read". **What happens** - Our app's browser gets a 403 from Cloudflare on the player page, so `_read_player_page` (backend/app/resolver/sportsurge.py) hands it to the solver. - The solver gets through (FlareSolverr: "Challenge solved!", HTTP 200, cf_clearance set). - `m3u8_from_html` then looks only in that page's own HTML. On dudestream1 the stream isn't there: the video plays in a frame loaded from `https://embedsports.me/basketball/<game>-stream-1`. The app never opens that frame, so it reports "no stream found". - `embedsports.me` has no Cloudflare check: a plain request with dudestream1 as the Referer gets 200. - tvsportslive.fr: the solver's answer was an ad network's tracking page (a hidden form posting to /api/users), not a player. It may be a dead end. **Proposed fix** When the page the solver returns has no stream link, take its player frames (skip `javascript:` frames, chat widgets and ad frames) and read each with `read_stream_from_page` in our own browser, with the player page as the Referer. **Check** During a live game that lists dudestream1, the link verifies and plays. Not related to #71 ("Sandbox detected"): the word "sandbox" in dudestream1's page belongs to an ad script, and our browser never reached the player.
Author
Owner

Live test, 2026-11-02 17:40 UTC, Sassuolo vs. Fiorentina (https://dudestream1.com/sd34txcfg3ergf6yt7y), run from a scratch script with the merged code.

The fix in PR #81 does not work in production yet.

  • The app's browser gets the 403 challenge, and courtesy.record(..., challenge=True) backs the host off.
  • The very next step, solver.fetch_page, is refused by that same backoff and returns None, so the solver never runs and no frame is opened. The read fails after about 21 s.
  • That is also why production's dudestream1 failures on 2026-11-01 took about 20 s each. It means the solver fallback for a challenged player page has not been running at all, on any site. My earlier diagnosis missed this, because I called the solver on its own.

With the backoff cleared in the script's process only, the whole path works:

  • The solver page held the frame https://streamec.st/embed/ch9.php (today's player is not embedsports.me).
  • The app's browser got a stream from that frame in 2 s (Referer https://embedcenter.st/), and the app's verify passed at 1280×720, 30 fps.
  • The whole read took 48 s, about 20 s of it waiting on the challenge.
  • The stream is on edgestream3.pro, so it may be a copy of a stream the embedcenter sites already give.

Fix needed: the solver read that follows a challenge in the same read must go past the backoff that challenge just set.

**Live test, 2026-11-02 17:40 UTC, Sassuolo vs. Fiorentina (`https://dudestream1.com/sd34txcfg3ergf6yt7y`), run from a scratch script with the merged code.** **The fix in PR #81 does not work in production yet.** - The app's browser gets the 403 challenge, and `courtesy.record(..., challenge=True)` backs the host off. - The very next step, `solver.fetch_page`, is refused by that same backoff and returns None, so the solver never runs and no frame is opened. The read fails after about 21 s. - That is also why production's dudestream1 failures on 2026-11-01 took about 20 s each. It means the solver fallback for a challenged player page has not been running at all, on any site. My earlier diagnosis missed this, because I called the solver on its own. **With the backoff cleared in the script's process only, the whole path works:** - The solver page held the frame `https://streamec.st/embed/ch9.php` (today's player is not embedsports.me). - The app's browser got a stream from that frame in 2 s (Referer `https://embedcenter.st/`), and the app's verify passed at 1280×720, 30 fps. - The whole read took 48 s, about 20 s of it waiting on the challenge. - The stream is on `edgestream3.pro`, so it may be a copy of a stream the embedcenter sites already give. **Fix needed:** the solver read that follows a challenge in the same read must go past the backoff that challenge just set.
Author
Owner

Live test, 2026-11-02 22:55-23:02 UTC, with the deployed read and the app's verify, from a scratch script. Stays open: no dudestream1 link verified.

Five live or about-to-start games listed dudestream1: Limache vs. Audax, Águilas Doradas vs. Fortaleza, Platense vs. C. Córdoba, Defensa y Justicia vs. Independiente (soccer), UIC vs. St Francis (basketball), plus Duke vs. Army before tip-off.

  • The code path works: the solver read now runs after the challenge (PR #82) and finds the frame.
  • The frame gives no stream: all of them use embedsports.me, including the soccer games. Each page has that one player, plus a chat frame. The three read in full failed in 53-68 s.
  • Why: opened on its own, embedsports.me answers "Direct access blocked, place iframe embed code on your website." Reading it as a link from the page isn't enough; it wants to be inside a frame on a site.
  • The one success so far (Sassuolo vs. Fiorentina, about 17:40 UTC) used streamec.st, not embedsports.me. So dudestream1 can work, but only on the games it serves from that player.
  • Production: no dudestream1 link has verified in the event log.

Getting past "Direct access blocked" would mean building a page of our own around the frame and passing it off as a site embedding the player. I haven't tried that.

A cost to weigh: a dudestream1 link now takes about a minute to fail, where it took about 20 s before PR #82, and it's usually second in a game's list. The backoff limits how often that happens, starting at 60 s and growing to 30 min.

**Live test, 2026-11-02 22:55-23:02 UTC, with the deployed read and the app's verify, from a scratch script. Stays open: no dudestream1 link verified.** Five live or about-to-start games listed dudestream1: Limache vs. Audax, Águilas Doradas vs. Fortaleza, Platense vs. C. Córdoba, Defensa y Justicia vs. Independiente (soccer), UIC vs. St Francis (basketball), plus Duke vs. Army before tip-off. - **The code path works:** the solver read now runs after the challenge (PR #82) and finds the frame. - **The frame gives no stream:** all of them use `embedsports.me`, including the soccer games. Each page has that one player, plus a chat frame. The three read in full failed in 53-68 s. - **Why:** opened on its own, `embedsports.me` answers "Direct access blocked, place iframe embed code on your website." Reading it as a link from the page isn't enough; it wants to be inside a frame on a site. - **The one success so far** (Sassuolo vs. Fiorentina, about 17:40 UTC) used `streamec.st`, not `embedsports.me`. So dudestream1 can work, but only on the games it serves from that player. - **Production:** no dudestream1 link has verified in the event log. **Getting past "Direct access blocked"** would mean building a page of our own around the frame and passing it off as a site embedding the player. I haven't tried that. **A cost to weigh:** a dudestream1 link now takes about a minute to fail, where it took about 20 s before PR #82, and it's usually second in a game's list. The backoff limits how often that happens, starting at 60 s and growing to 30 min.
Author
Owner

Closed at the owner's word (2026-11-08): the fix is merged to develop in PR #81 and PR #82 (merge 518cab0) and deployed. A new issue will be opened if a problem shows up.

Closed at the owner's word (2026-11-08): the fix is merged to develop in PR #81 and PR #82 (merge 518cab0) and deployed. A new issue will be opened if a problem shows up.
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#78
No description provided.