From 436818ef341a43bd2787fac20a424df4cd9faa73 Mon Sep 17 00:00:00 2001 From: odium1963 Date: Wed, 22 Apr 2026 11:18:34 -0400 Subject: [PATCH] Fix Playwright timeout by waiting for domcontentloaded instead of load wcostream.tv has many ad/tracking scripts that delay the load event indefinitely. Switching to domcontentloaded (fires once the HTML is parsed) and commit (fallback, fires on first byte) avoids the 30s timeout while still capturing the iframe src we need. Co-Authored-By: odium1963 --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 76ee35c..0fe9b36 100644 --- a/main.py +++ b/main.py @@ -117,7 +117,7 @@ def get_rendered_page(self, url: str, timeout_ms: int = 30000, referer: str = "" page = context.new_page() - for wait in ("load", "domcontentloaded"): + for wait in ("domcontentloaded", "commit"): try: page.goto(url, timeout=timeout_ms, wait_until=wait) break