[kemonoparty] use '"type": "archive"' for 'archives' files (#7195)
This commit is contained in:
@@ -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"])
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user