mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-04-30 14:50:39 +00:00
Handle ERR_ABORTED caused by some redirects etc
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user