[moebooru:pool] replace underscores in pool names (#4646)
https://github.com/mikf/gallery-dl/issues/4646#issuecomment-2815698517
This commit is contained in:
@@ -127,6 +127,7 @@ class MoebooruPoolExtractor(MoebooruExtractor):
|
||||
if self.config("metadata"):
|
||||
url = "{}/pool/show/{}.json".format(self.root, self.pool_id)
|
||||
pool = self.request(url).json()
|
||||
pool["name"] = pool["name"].replace("_", " ")
|
||||
pool.pop("posts", None)
|
||||
return {"pool": pool}
|
||||
return {"pool": text.parse_int(self.pool_id)}
|
||||
|
||||
@@ -12,6 +12,59 @@ __tests__ = (
|
||||
"#url" : "https://www.sakugabooru.com/post/show/125570",
|
||||
"#category": ("moebooru", "sakugabooru", "post"),
|
||||
"#class" : moebooru.MoebooruPostExtractor,
|
||||
"#options" : {"tags": True},
|
||||
"#urls" : "https://www.sakugabooru.com/data/31db5edb23f7b5db590d182ea84a00b2.mp4",
|
||||
|
||||
"actual_preview_height": 169,
|
||||
"actual_preview_width": 300,
|
||||
"approver_id": 508,
|
||||
"author": "chii",
|
||||
"change": 595064,
|
||||
"created_at": 1592745120,
|
||||
"creator_id": 5287,
|
||||
"date" : "dt:2020-06-21 13:12:00",
|
||||
"extension": "mp4",
|
||||
"file_ext": "mp4",
|
||||
"file_size": 3472647,
|
||||
"file_url": "https://www.sakugabooru.com/data/31db5edb23f7b5db590d182ea84a00b2.mp4",
|
||||
"filename": "31db5edb23f7b5db590d182ea84a00b2",
|
||||
"frames": [],
|
||||
"frames_pending": [],
|
||||
"frames_pending_string": "",
|
||||
"frames_string": "",
|
||||
"has_children": False,
|
||||
"height": 480,
|
||||
"id": 125570,
|
||||
"is_held": False,
|
||||
"is_note_locked": False,
|
||||
"is_pending": False,
|
||||
"is_rating_locked": False,
|
||||
"is_shown_in_index": True,
|
||||
"jpeg_file_size": 0,
|
||||
"jpeg_height": 480,
|
||||
"jpeg_url": "https://www.sakugabooru.com/data/31db5edb23f7b5db590d182ea84a00b2.mp4",
|
||||
"jpeg_width": 854,
|
||||
"last_commented_at": 0,
|
||||
"last_noted_at": 0,
|
||||
"md5": "31db5edb23f7b5db590d182ea84a00b2",
|
||||
"parent_id": None,
|
||||
"preview_height": 84,
|
||||
"preview_url": "https://www.sakugabooru.com/data/preview/31db5edb23f7b5db590d182ea84a00b2.jpg",
|
||||
"preview_width": 150,
|
||||
"rating": "s",
|
||||
"sample_file_size": 0,
|
||||
"sample_height": 480,
|
||||
"sample_url": "https://www.sakugabooru.com/data/31db5edb23f7b5db590d182ea84a00b2.mp4",
|
||||
"sample_width": 854,
|
||||
"score": range(20, 50),
|
||||
"source": "#14",
|
||||
"status": "active",
|
||||
"tags": "animals animated artist_unknown character_acting creatures nichijou smears",
|
||||
"tags_artist": "artist_unknown",
|
||||
"tags_copyright": "nichijou",
|
||||
"tags_general": "animals animated character_acting creatures smears",
|
||||
"updated_at": 1592819293,
|
||||
"width": 854,
|
||||
},
|
||||
|
||||
{
|
||||
@@ -21,9 +74,29 @@ __tests__ = (
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.sakugabooru.com/pool/show/54",
|
||||
"#url" : "https://www.sakugabooru.com/pool/show/1",
|
||||
"#category": ("moebooru", "sakugabooru", "pool"),
|
||||
"#class" : moebooru.MoebooruPoolExtractor,
|
||||
"#options" : {"metadata": True},
|
||||
"#urls" : (
|
||||
"https://www.sakugabooru.com/data/cd1fe3601ddbb8b13db794a1f51acf36.gif",
|
||||
"https://www.sakugabooru.com/data/c6dedf058957f89126bcbdfd209bfc69.gif",
|
||||
"https://www.sakugabooru.com/data/3a8d6b7ec40fb66447d160d53759ec71.gif",
|
||||
"https://www.sakugabooru.com/data/09f50c0cc6b3d922cd6b34a99103cc51.gif",
|
||||
"https://www.sakugabooru.com/data/9d219fd70727eb9fe5a7fb04b7cc7c47.gif",
|
||||
"https://www.sakugabooru.com/data/5a2d035974f26221ce3d8914e74695c6.gif",
|
||||
),
|
||||
|
||||
"pool": {
|
||||
"created_at" : "2013-08-18T15:48:19.938Z",
|
||||
"description": "",
|
||||
"id" : 1,
|
||||
"is_public" : True,
|
||||
"name" : "Yutapon Stranger Genga Comparisons",
|
||||
"post_count" : 6,
|
||||
"updated_at" : "2013-08-18T15:58:19.037Z",
|
||||
"user_id" : 4,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -60,6 +60,11 @@ __tests__ = (
|
||||
"#category": ("moebooru", "yandere", "pool"),
|
||||
"#class" : moebooru.MoebooruPoolExtractor,
|
||||
"#sha1_content": "2a35b9d6edecce11cc2918c6dce4de2198342b68",
|
||||
"#urls" : (
|
||||
"https://files.yande.re/image/62558ad1d68ffb47e903694d2c5f9e53/yande.re%2051824%20armor%20ouzoku%20pantsu%20sasaki_tamaru%20softhouse_chara%20sword%20thighhighs.jpg",
|
||||
"https://files.yande.re/image/c57fcd886f643297f1283242e572b81d/yande.re%2036975%20ashita_no_kimi_to_au_tame_ni%20cleavage%20kurashima_tomoyasu%20pantsu%20wakamiya_asuka.jpg",
|
||||
"https://files.yande.re/image/c877ec0dc18dd79d69217011adfa5af3/yande.re%2051832%20aburidashi_zakuro%20animal_ears%20erect_nipples%20pantsu%20tail.jpg",
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
@@ -75,7 +80,7 @@ __tests__ = (
|
||||
"description": "Dengeki Hime's posts are in pool #97.",
|
||||
"id" : 318,
|
||||
"is_public" : True,
|
||||
"name" : "Galgame_Mag_08",
|
||||
"name" : "Galgame Mag 08",
|
||||
"post_count" : 3,
|
||||
"updated_at" : "2012-03-11T14:31:00.935Z",
|
||||
"user_id" : 1305,
|
||||
|
||||
Reference in New Issue
Block a user