From 814ad9321e06a9705fb1c0ffb18d624faacd65a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 13 Feb 2024 14:15:12 +0100 Subject: [PATCH] [deviantart] skip locked/blurred posts (#4567, #5193) --- gallery_dl/extractor/deviantart.py | 6 ++++++ test/results/deviantart.py | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index bcfbe73b14..155766888f 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -119,6 +119,12 @@ def items(self): "Skipping %s (deleted)", deviation["deviationid"]) continue + tier_access = deviation.get("tier_access") + if tier_access == "locked": + self.log.debug( + "Skipping %s (access locked)", deviation["deviationid"]) + continue + if "premium_folder_data" in deviation: data = self._fetch_premium(deviation) if not data: diff --git a/test/results/deviantart.py b/test/results/deviantart.py index e805024685..b4f09ecf6f 100644 --- a/test/results/deviantart.py +++ b/test/results/deviantart.py @@ -742,11 +742,18 @@ "#comment" : "journal-like post with isJournal == False (#419)", "#category": ("", "deviantart", "deviation"), "#class" : deviantart.DeviantartDeviationExtractor, - "#pattern" : """text: -""", + "#pattern" : """text:\n""", "#sha1_url": "e2e0044bd255304412179b6118536dbd9bb3bb0e", }, +{ + "#url" : "https://www.deviantart.com/neotypical/art/985226590", + "#comment" : "subscription locked (#4567)", + "#category": ("", "deviantart", "deviation"), + "#class" : deviantart.DeviantartDeviationExtractor, + "#count" : 0, +}, + { "#url" : "https://deviantart.com/view/904858796/", "#comment" : "/view/ URLs",