From 9ee45f36173a3ab141d104dd025dc0b86f49f9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 28 Jun 2021 23:34:58 +0200 Subject: [PATCH] [kemonoparty] warn about missing DDoS-GUARD cookies --- gallery_dl/extractor/kemonoparty.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gallery_dl/extractor/kemonoparty.py b/gallery_dl/extractor/kemonoparty.py index a1239308..62f42c20 100644 --- a/gallery_dl/extractor/kemonoparty.py +++ b/gallery_dl/extractor/kemonoparty.py @@ -22,8 +22,15 @@ class KemonopartyExtractor(Extractor): directory_fmt = ("{category}", "{service}", "{user}") filename_fmt = "{id}_{title}_{num:>02}_{filename}.{extension}" archive_fmt = "{service}_{user}_{id}_{num}" + cookiedomain = ".kemono.party" + _warning = True def items(self): + if self._warning: + if not self._check_cookies(("__ddg1", "__ddg2")): + self.log.warning("no DDoS-GUARD cookies set (__ddg1, __ddg2)") + KemonopartyExtractor._warning = False + find_inline = re.compile(r'src="(/inline/[^"]+)').findall if self.config("metadata"):