From 5dd68468b9268bd7366f970f017cc7674852a94c Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 22 Mar 2026 11:21:05 +0100 Subject: [PATCH] Handle ERR_ABORTED caused by some redirects etc --- changedetectionio/content_fetchers/puppeteer.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/changedetectionio/content_fetchers/puppeteer.py b/changedetectionio/content_fetchers/puppeteer.py index 9628a6dc..c5ffbf16 100644 --- a/changedetectionio/content_fetchers/puppeteer.py +++ b/changedetectionio/content_fetchers/puppeteer.py @@ -429,6 +429,14 @@ class fetcher(Fetcher): except Exception: pass break # response stays None; fall through to use first_response_data + except Exception as e: + if 'ERR_ABORTED' in str(e): + # Anti-bot JS challenges (Cloudflare, WP Simple Firewall etc) or JS-initiated + # redirects can cause Chrome to abort the original navigation. The page DOM is + # still loaded with whatever content was served, so proceed and scrape it. + logger.opt(exception=True).warning(f"[{watch_uuid}] page.goto() ERR_ABORTED for {url} - likely anti-bot challenge or JS redirect, proceeding with loaded content") + break # response stays None; fall through to use first_response_data + raise await asyncio.sleep(1 + extra_wait) # Check if page still exists before sending command