[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":
|
elif ext == "txt" and file["extension"] != "txt":
|
||||||
file["_http_validate"] = _validate
|
file["_http_validate"] = _validate
|
||||||
elif ext in exts_archive:
|
elif ext in exts_archive:
|
||||||
|
file["type"] = "archive"
|
||||||
if archives:
|
if archives:
|
||||||
try:
|
try:
|
||||||
data = self.api.posts_archives(file["hash"])
|
data = self.api.posts_archives(file["hash"])
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ __tests__ = (
|
|||||||
"#category": ("", "kemonoparty", "fanbox"),
|
"#category": ("", "kemonoparty", "fanbox"),
|
||||||
"#class" : kemonoparty.KemonopartyPostExtractor,
|
"#class" : kemonoparty.KemonopartyPostExtractor,
|
||||||
"#options" : {"archives": True},
|
"#options" : {"archives": True},
|
||||||
|
"#range" : "1-2",
|
||||||
|
|
||||||
"archives": [
|
"archives": [
|
||||||
{
|
{
|
||||||
@@ -362,7 +363,7 @@ __tests__ = (
|
|||||||
"name": "モナmp4形式まとめ.zip",
|
"name": "モナmp4形式まとめ.zip",
|
||||||
"password": None,
|
"password": None,
|
||||||
"path": "/c2/2c/c22c7e979355f633aaae4929b010816895a47ec37a9cfc25186a0952ec6e5774.zip",
|
"path": "/c2/2c/c22c7e979355f633aaae4929b010816895a47ec37a9cfc25186a0952ec6e5774.zip",
|
||||||
"type": "attachment",
|
"type": "archive",
|
||||||
"url": "https://kemono.su/data/c2/2c/c22c7e979355f633aaae4929b010816895a47ec37a9cfc25186a0952ec6e5774.zip",
|
"url": "https://kemono.su/data/c2/2c/c22c7e979355f633aaae4929b010816895a47ec37a9cfc25186a0952ec6e5774.zip",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -384,12 +385,13 @@ __tests__ = (
|
|||||||
"name": "モナUnity.zip",
|
"name": "モナUnity.zip",
|
||||||
"password": None,
|
"password": None,
|
||||||
"path": "/f7/b4/f7b4dedd9742aeb8da56dc6fe07deb7639880d0800ac0b7a6e91f64ff6b40178.zip",
|
"path": "/f7/b4/f7b4dedd9742aeb8da56dc6fe07deb7639880d0800ac0b7a6e91f64ff6b40178.zip",
|
||||||
"type": "attachment",
|
"type": "archive",
|
||||||
"url": "https://kemono.su/data/f7/b4/f7b4dedd9742aeb8da56dc6fe07deb7639880d0800ac0b7a6e91f64ff6b40178.zip"
|
"url": "https://kemono.su/data/f7/b4/f7b4dedd9742aeb8da56dc6fe07deb7639880d0800ac0b7a6e91f64ff6b40178.zip"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
"title": "モナ(Live2Dアニメ)",
|
"title": "モナ(Live2Dアニメ)",
|
||||||
|
"type": "archive",
|
||||||
"user": "49494721",
|
"user": "49494721",
|
||||||
"username": "soso",
|
"username": "soso",
|
||||||
"user_profile": {
|
"user_profile": {
|
||||||
|
|||||||
Reference in New Issue
Block a user