mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[pillowfort] provide 'count' metadata field (#6478)
This commit is contained in:
parent
9821503226
commit
a3dbc58172
@ -52,6 +52,7 @@ class PillowfortExtractor(Extractor):
|
||||
post["date"] = text.parse_datetime(
|
||||
post["created_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
|
||||
post["post_id"] = post.pop("id")
|
||||
post["count"] = len(files)
|
||||
yield Message.Directory, post
|
||||
|
||||
post["num"] = 0
|
||||
|
@ -22,6 +22,7 @@ __tests__ = (
|
||||
"comments_count" : int,
|
||||
"community_id" : None,
|
||||
"content" : str,
|
||||
"count" : 4,
|
||||
"created_at" : str,
|
||||
"date" : datetime.datetime,
|
||||
"deleted" : None,
|
||||
@ -36,7 +37,7 @@ __tests__ = (
|
||||
"likes_count" : int,
|
||||
"media_type" : "picture",
|
||||
"nsfw" : False,
|
||||
"num" : int,
|
||||
"num" : range(1, 4),
|
||||
"original_post_id": None,
|
||||
"original_post_user_id": None,
|
||||
"picture_content_type": None,
|
||||
@ -84,6 +85,7 @@ __tests__ = (
|
||||
"community_id" : None,
|
||||
"concealed_comment_warning": None,
|
||||
"content" : "<p>Sea Bed</p>",
|
||||
"count" : 1,
|
||||
"created_at" : r"re:2020-02-.+",
|
||||
"currentuser_default_avatar_url": None,
|
||||
"currentuser_multi_avi": None,
|
||||
@ -177,7 +179,7 @@ __tests__ = (
|
||||
"#category": ("", "pillowfort", "user"),
|
||||
"#class" : pillowfort.PillowfortUserExtractor,
|
||||
"#pattern" : r"https://img\d+\.pillowfort\.social/posts/",
|
||||
"#count" : range(10, 20),
|
||||
"#count" : range(30, 50),
|
||||
},
|
||||
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user