From 74f1e9a1ace1aa7463926370798737111b896ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 10 Nov 2024 08:26:43 +0100 Subject: [PATCH] [poipiku] return 'count' as proper number (#6445) --- gallery_dl/extractor/poipiku.py | 2 +- test/results/poipiku.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gallery_dl/extractor/poipiku.py b/gallery_dl/extractor/poipiku.py index bd222835..e09a7aae 100644 --- a/gallery_dl/extractor/poipiku.py +++ b/gallery_dl/extractor/poipiku.py @@ -41,7 +41,7 @@ class PoipikuExtractor(Extractor): post = { "post_category": extr("[", "]"), - "count" : extr("(", " "), + "count" : text.parse_int(extr("(", " ")), "post_id" : parts[-1].partition(".")[0], "user_id" : parts[-2], "user_name" : text.unescape(extr( diff --git a/test/results/poipiku.py b/test/results/poipiku.py index 08658bae..dd9e744d 100644 --- a/test/results/poipiku.py +++ b/test/results/poipiku.py @@ -29,7 +29,7 @@ __tests__ = ( "#class" : poipiku.PoipikuPostExtractor, "#pattern" : r"https://img-org\.poipiku\.com/user_img\d+/000025049/005864576_EWN1Y65gQ\.png$", - "count" : "1", + "count" : 1, "description" : "", "extension" : "png", "filename" : "005864576_EWN1Y65gQ", @@ -47,7 +47,7 @@ __tests__ = ( "#pattern" : r"https://img-org\.poipiku\.com/user_img\d+/002166245/006411749_\w+\.jpeg$", "#count" : 4, - "count" : "4", + "count" : 4, "description" : "絵茶の産物ネタバレあるやつ", "num" : int, "post_category": "SPOILER", @@ -64,7 +64,7 @@ __tests__ = ( "#pattern" : r"https://img-org\.poipiku.com/user_img\d+/003572553/005776587_(\d+_)?\w+\.jpeg$", "#count" : 3, - "count" : "3", + "count" : 3, "description" : "ORANGE OASISボスネタバレ<br />曲も大好き<br />2枚目以降はほとんど見えなかった1枚目背景のヒエログリフ小ネタです𓀀", "num" : int, "post_category": "SPOILER",