From 2a1cb403ee8b38bd6c888de88c48a38452dd0565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 1 Nov 2022 21:23:05 +0100 Subject: [PATCH] Revert "[Deviantart] [#1776] Remove the "you need session cookies to download mature scraps" warning (#1777)" This reverts commit 1f02878351731c207b51a17dc528ef0a47d726bc. Mature scraps do yet again require cookies. --- gallery_dl/extractor/deviantart.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index cb2aa242da..12218438ab 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -960,9 +960,15 @@ class DeviantartScrapsExtractor(DeviantartExtractor): ) cookiedomain = ".deviantart.com" cookienames = ("auth", "auth_secure", "userinfo") + _warning = True def deviations(self): eclipse_api = DeviantartEclipseAPI(self) + if self._warning: + DeviantartScrapsExtractor._warning = False + if not self._check_cookies(self.cookienames): + self.log.warning( + "No session cookies set: Unable to fetch mature scraps.") for obj in eclipse_api.gallery_scraps(self.user, self.offset): deviation = obj["deviation"]