Skip to content

Commit

Permalink
[deviantart] skip locked/blurred posts (#4567, #5193)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Feb 13, 2024
1 parent f7f8ef8 commit 814ad93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 9 additions & 2 deletions test/results/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,18 @@
"#comment" : "journal-like post with isJournal == False (#419)",
"#category": ("", "deviantart", "deviation"),
"#class" : deviantart.DeviantartDeviationExtractor,
"#pattern" : """text:<!DOCTYPE html>
""",
"#pattern" : """text:<!DOCTYPE html>\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",
Expand Down

0 comments on commit 814ad93

Please sign in to comment.