From 62f9335b827ab10d4beeb67e5a7a2e7958975ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 23 Mar 2025 15:07:15 +0100 Subject: [PATCH] [kemonoparty] use '"type": "archive"' for 'archives' files (#7195) --- gallery_dl/extractor/kemonoparty.py | 1 + test/results/kemonoparty.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/kemonoparty.py b/gallery_dl/extractor/kemonoparty.py index 2a1c17d5..55e5eba8 100644 --- a/gallery_dl/extractor/kemonoparty.py +++ b/gallery_dl/extractor/kemonoparty.py @@ -147,6 +147,7 @@ class KemonopartyExtractor(Extractor): elif ext == "txt" and file["extension"] != "txt": file["_http_validate"] = _validate elif ext in exts_archive: + file["type"] = "archive" if archives: try: data = self.api.posts_archives(file["hash"]) diff --git a/test/results/kemonoparty.py b/test/results/kemonoparty.py index 4d59b70e..874f56f8 100644 --- a/test/results/kemonoparty.py +++ b/test/results/kemonoparty.py @@ -333,6 +333,7 @@ __tests__ = ( "#category": ("", "kemonoparty", "fanbox"), "#class" : kemonoparty.KemonopartyPostExtractor, "#options" : {"archives": True}, + "#range" : "1-2", "archives": [ { @@ -362,7 +363,7 @@ __tests__ = ( "name": "モナmp4形式まとめ.zip", "password": None, "path": "/c2/2c/c22c7e979355f633aaae4929b010816895a47ec37a9cfc25186a0952ec6e5774.zip", - "type": "attachment", + "type": "archive", "url": "https://kemono.su/data/c2/2c/c22c7e979355f633aaae4929b010816895a47ec37a9cfc25186a0952ec6e5774.zip", }, { @@ -384,12 +385,13 @@ __tests__ = ( "name": "モナUnity.zip", "password": None, "path": "/f7/b4/f7b4dedd9742aeb8da56dc6fe07deb7639880d0800ac0b7a6e91f64ff6b40178.zip", - "type": "attachment", + "type": "archive", "url": "https://kemono.su/data/f7/b4/f7b4dedd9742aeb8da56dc6fe07deb7639880d0800ac0b7a6e91f64ff6b40178.zip" }, ], "title": "モナ(Live2Dアニメ)", + "type": "archive", "user": "49494721", "username": "soso", "user_profile": {