From 6119ed3aeff9bdacdd8adbf7171ce3a2ffde2e0d Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 28 Mar 2026 21:52:53 -0700 Subject: [PATCH] Updated manual entry --- db.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db.py b/db.py index b30a374..a0a3580 100644 --- a/db.py +++ b/db.py @@ -29,6 +29,10 @@ def _is_blocked_response(html, status_code): return True if "enable javascript and cookies" in html_lower: return True + if "request rejected" in html_lower: + return True + if "access denied" in html_lower: + return True return False @@ -295,7 +299,7 @@ def fetch_page(url): resp = requests.get(url, timeout=10, headers={"User-Agent": "TinyWeb/1.0"}, allow_redirects=False) if _is_blocked_response(resp.text, resp.status_code): - raise Exception("Site blocks automated access (Cloudflare/CDN protection)") + raise Exception(f"Site blocks automated access: {resp.status_code}") # Follow redirects manually, re-validating each target max_redirects = 5