Skip to content

Commit

Permalink
[pixiv] ignore 'limit_sanity_level' images (#4328)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jul 22, 2023
1 parent 088e8d5 commit a45a17d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gallery_dl/extractor/pixiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def transform_tags(work):
def transform_tags(work):
work["tags"] = [tag["name"] for tag in work["tags"]]

url_sanity = ("https://s.pximg.net/common/images"
"/limit_sanity_level_360.png")
ratings = {0: "General", 1: "R-18", 2: "R-18G"}
meta_user = self.config("metadata")
meta_bookmark = self.config("metadata-bookmark")
Expand Down Expand Up @@ -102,6 +104,10 @@ def transform_tags(work):

elif work["page_count"] == 1:
url = meta_single_page["original_image_url"]
if url == url_sanity:
self.log.debug("Skipping 'sanity_level' warning (%s)",
work["id"])
continue
work["date_url"] = self._date_from_url(url)
yield Message.Url, url, text.nameext_from_url(url, work)

Expand Down

0 comments on commit a45a17d

Please sign in to comment.