From f0267f969a191fd38d25ee0eee4332d066bf6183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 26 Sep 2024 15:13:10 +0200 Subject: [PATCH] [skeb] prevent 429 errors and need for 'request_key' cookie https://github.com/danbooru/danbooru/pull/5795 --- gallery_dl/extractor/skeb.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/skeb.py b/gallery_dl/extractor/skeb.py index 6ec44bad..07c9b21e 100644 --- a/gallery_dl/extractor/skeb.py +++ b/gallery_dl/extractor/skeb.py @@ -26,7 +26,11 @@ class SkebExtractor(Extractor): def _init(self): self.thumbnails = self.config("thumbnails", False) self.article = self.config("article", False) - self.headers = {"Accept": "application/json, text/plain, */*"} + self.headers = { + "Accept": "application/json, text/plain, */*", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-origin", + } if "Authorization" not in self.session.headers: self.headers["Authorization"] = "Bearer null"