From 86f3f3f7630cc6157c7e4338912a0fa73dbcb02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 8 Dec 2024 21:39:04 +0100 Subject: [PATCH] [common] detect DDoS-Guard challenge pages --- gallery_dl/extractor/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index 5f9d3550..c0f4d9c1 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -212,6 +212,11 @@ class Extractor(): if b'name="captcha-bypass"' in content: self.log.warning("Cloudflare CAPTCHA") break + elif server and server.startswith("ddos-guard") and \ + code == 403: + if b"/ddos-guard/js-challenge/" in response.content: + self.log.warning("DDoS-Guard challenge") + break if code == 429 and self._handle_429(response): continue