[kemonoparty] add 'endpoint' option (#7438)

This commit is contained in:
Mike Fährmann
2025-04-28 16:47:48 +02:00
parent f6330bf16d
commit 16b5d41ce5
4 changed files with 88 additions and 9 deletions

View File

@@ -15,15 +15,68 @@ __tests__ = (
"#class" : kemonoparty.KemonopartyUserExtractor,
"#range" : "1-500",
"#count" : 500,
"archives" : list,
"attachments": list,
"count" : int,
"num" : int,
"date" : "type:datetime",
"id" : str,
"published" : str,
"service" : "fanbox",
"subcategory": "fanbox",
"substring" : str,
"title" : str,
"user" : "6993449",
"username" : "かえぬこ",
"file" : {
"extension": str,
"filename" : str,
"hash" : "len:str:64",
"name" : str,
"path" : str,
"type" : "file",
"url" : str,
},
},
{
"#url" : "https://kemono.su/patreon/user/881792?o=150",
"#comment" : "'max-posts' option, 'o' query parameter (#1674)",
"#comment" : "'max-posts' and 'endpoint' option, 'o' query parameter (#1674)",
"#category": ("", "kemonoparty", "patreon"),
"#class" : kemonoparty.KemonopartyUserExtractor,
"#options" : {"max-posts": 100},
"#options" : {"max-posts": 100, "endpoint": "posts"},
"#count" : range(200, 400),
"added" : {str, None},
"archives" : [],
"attachments": list,
"captions" : None,
"content" : str,
"count" : int,
"num" : int,
"date" : "type:datetime",
"edited" : str,
"embed" : dict,
"id" : str,
"poll" : None,
"published" : str,
"service" : "fanbox",
"shared_file": False,
"subcategory": "fanbox",
"tags" : str,
"title" : str,
"user" : "6993449",
"username" : "かえぬこ",
"file" : {
"extension": str,
"filename" : str,
"hash" : "len:str:64",
"name" : str,
"path" : str,
"type" : "file",
"url" : str,
},
},
{
@@ -76,7 +129,7 @@ __tests__ = (
"#pattern" : r"https://kemono.su/data/21/0f/210f35388e28bbcf756db18dd516e2d82ce75[0-9a-f]+\.jpg",
"#sha1_content": "900949cefc97ab8dc1979cc3664785aac5ba70dd",
"added" : "2020-05-06T20:28:02.302000",
"added" : None,
"archives" : [],
"content" : str,
"count" : 1,