From 8967a6e87e191b023ed69200ee3c18ee58bcdedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 3 Sep 2025 21:59:05 +0200 Subject: [PATCH] [shimmie2] support 'co.llection.pics' (#8166) --- docs/supportedsites.md | 6 ++++ gallery_dl/extractor/shimmie2.py | 4 +++ scripts/supportedsites.py | 1 + test/results/thecollectionS.py | 48 ++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 test/results/thecollectionS.py diff --git a/docs/supportedsites.md b/docs/supportedsites.md index fea4935e..fcffb9dc 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -1585,6 +1585,12 @@ Consider all listed sites to potentially be NSFW. Posts, Tag Searches + + The /co/llection + https://co.llection.pics/ + Posts, Tag Searches + + szurubooru Instances diff --git a/gallery_dl/extractor/shimmie2.py b/gallery_dl/extractor/shimmie2.py index 6e52f13e..36b083be 100644 --- a/gallery_dl/extractor/shimmie2.py +++ b/gallery_dl/extractor/shimmie2.py @@ -81,6 +81,10 @@ BASE_PATTERN = Shimmie2Extractor.update({ "root": "https://noz.rip/booru", "pattern": r"noz\.rip/booru", }, + "thecollectionS": { + "root": "https://co.llection.pics", + "pattern": r"co\.llection\.pics", + }, }) + r"/(?:index\.php\?q=/?)?" diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index 3f426dcd..e6f7109e 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -172,6 +172,7 @@ CATEGORY_MAP = { "thatpervert" : "ThatPervert", "thebarchive" : "The /b/ Archive", "thecollection" : "The /co/llection", + "thecollectionS" : "The /co/llection", "tiktok" : "TikTok", "tmohentai" : "TMOHentai", "tumblrgallery" : "TumblrGallery", diff --git a/test/results/thecollectionS.py b/test/results/thecollectionS.py new file mode 100644 index 00000000..aa0d6e66 --- /dev/null +++ b/test/results/thecollectionS.py @@ -0,0 +1,48 @@ +# -*- 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://co.llection.pics/post/view/23", + "#category": ("shimmie2", "thecollectionS", "post"), + "#class" : shimmie2.Shimmie2PostExtractor, + "#results" : "https://co.llection.pics/_images/0f431221d96251e6db62cb2c57f5b29f/23%20-%20crossovers%20dc%20goku%20kal-el%20superman.jpg", + + "extension": "jpg", + "file_url" : "https://co.llection.pics/_images/0f431221d96251e6db62cb2c57f5b29f/23%20-%20crossovers%20dc%20goku%20kal-el%20superman.jpg", + "filename" : "23 - crossovers dc goku kal-el superman", + "height" : 628, + "id" : 23, + "md5" : "0f431221d96251e6db62cb2c57f5b29f", + "size" : 0, + "tags" : "crossovers dc goku kal-el superman", + "width" : 1124, +}, + +{ + "#url" : "https://co.llection.pics/post/list/crossovers/1", + "#category": ("shimmie2", "thecollectionS", "tag"), + "#class" : shimmie2.Shimmie2TagExtractor, + "#range" : "1-80", + "#pattern" : r"https://co\.llection\.pics/_images/\w{32}/\d+.+\.(jpe?g|png|gif)", + "#count" : 80, + + "id" : int, + "filename" : str, + "extension" : {"jpg", "jpeg", "png", "gif"}, + "file_url" : r"re:https://co.llection.pics/_images/\w{32}/.+", + "width" : range(100, 8_000), + "height" : range(100, 8_000), + "md5" : r"re:\w{32}", + "search_tags": "crossovers", + "size" : range(1_000, 8_000_000), + "tags" : str, +}, + +)