From 9abeab5ecf222dd616f6e6126bef731390019445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 6 Jun 2024 15:08:56 +0200 Subject: [PATCH] [shimmie2] support 'vidya.pics' (#5632) --- docs/supportedsites.md | 6 +++++ gallery_dl/extractor/shimmie2.py | 4 ++++ scripts/supportedsites.py | 1 + test/results/vidyapics.py | 38 ++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 test/results/vidyapics.py diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 6bdd4ea6..3a4a5ab9 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -1381,6 +1381,12 @@ Consider all listed sites to potentially be NSFW. Posts, Tag Searches + + Vidya Booru + https://vidya.pics/ + Posts, Tag Searches + + szurubooru Instances diff --git a/gallery_dl/extractor/shimmie2.py b/gallery_dl/extractor/shimmie2.py index 67f38c4b..a68f0db2 100644 --- a/gallery_dl/extractor/shimmie2.py +++ b/gallery_dl/extractor/shimmie2.py @@ -92,6 +92,10 @@ BASE_PATTERN = Shimmie2Extractor.update({ "root": "https://rule34hentai.net", "pattern": r"rule34hentai\.net", }, + "vidyapics": { + "root": "https://vidya.pics", + "pattern": r"vidya\.pics", + }, }) + r"/(?:index\.php\?q=/?)?" diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index d5ddfd24..3e5f21ce 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -138,6 +138,7 @@ CATEGORY_MAP = { "tumblrgallery" : "TumblrGallery", "vanillarock" : "もえぴりあ", "vidyart2" : "/v/idyart2", + "vidyapics" : "Vidya Booru", "vk" : "VK", "vsco" : "VSCO", "wallpapercave" : "Wallpaper Cave", diff --git a/test/results/vidyapics.py b/test/results/vidyapics.py new file mode 100644 index 00000000..bb81760a --- /dev/null +++ b/test/results/vidyapics.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +from gallery_dl.extractor import shimmie2 + + +__tests__ = ( +{ + "#url" : "https://vidya.pics/post/list/kirby/1", + "#category": ("shimmie2", "vidyapics", "tag"), + "#class" : shimmie2.Shimmie2TagExtractor, + "#pattern" : r"https://vidya.pics/_images/[0-9a-f]{32}/\d+", + "#range" : "1-100", + "#count" : 100, +}, + +{ + "#url" : "https://vidya.pics/post/view/108820", + "#category": ("shimmie2", "vidyapics", "post"), + "#class" : shimmie2.Shimmie2PostExtractor, + "#pattern" : r"https://vidya\.pics/_images/277ecdb90285bfa6e0c4cd46d9515b11/108820.+\.png", + "#sha1_content": "7d2fe9327759c231ff17f6e341df749b70b191ce", + + "extension": "png", + "file_url" : "https://vidya.pics/_images/277ecdb90285bfa6e0c4cd46d9515b11/108820%20-%201boy%20artist%3Aunknown%20flag%20kirby%20kirby_%28series%29.png", + "filename" : "108820 - 1boy artist:unknown flag kirby kirby_(series)", + "height" : 700, + "id" : 108820, + "md5" : "277ecdb90285bfa6e0c4cd46d9515b11", + "size" : 0, + "tags" : "1boy artist:unknown flag kirby kirby_(series", + "width" : 700, +}, + +)